From 777e176e81caea27ebdb480447432826d9a7c613 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 24 Sep 2019 03:26:28 +0200 Subject: [PATCH 1/2] add arg version(#4) and helpmenue(#3) --- logwert.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/logwert.ps1 b/logwert.ps1 index 42b303c..02ca3cb 100755 --- a/logwert.ps1 +++ b/logwert.ps1 @@ -158,6 +158,12 @@ function Calc_Byte_Sice ([Double]$Wert, [String]$EinheitEingabe, [String]$Einhei ########################################################################################################## +If ($args[0] -eq "--version") { + echo "Version: 1.2" +} ElseIf ($args[0] -eq "--help") { + echo "./logwert.ps1 [log1] [log2] ..." +} Else { + #for each param do start(param) $args | ForEach-Object { Log_Start $_ } @@ -169,3 +175,5 @@ $args | ForEach-Object { Log_Start $_ } [String]$sLog_Copy_Size_Einheit = "$Global:Log_Copy_Size_Einheit" echo "Summary: $sLog_Copy_real_item of $sLog_Copy_item files copied, $sLog_Copy_errors errors, $sLog_Copy_real_Size $sLog_Copy_Size_Einheit of $sLog_Copy_Size $sLog_Copy_Size_Einheit copied" + +} -- 2.47.1 From c40c3e245cc4092ae02b7791a7ceed7edcd0afdb Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 24 Sep 2019 03:27:06 +0200 Subject: [PATCH 2/2] code format --- logwert.ps1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/logwert.ps1 b/logwert.ps1 index 02ca3cb..108abbe 100755 --- a/logwert.ps1 +++ b/logwert.ps1 @@ -164,16 +164,16 @@ If ($args[0] -eq "--version") { echo "./logwert.ps1 [log1] [log2] ..." } Else { -#for each param do start(param) -$args | ForEach-Object { Log_Start $_ } + #for each param do start(param) + $args | ForEach-Object { Log_Start $_ } -[String]$sLog_Copy_errors = "$Global:zLog_Copy_errors" -[String]$sLog_Copy_Size = [math]::round((Calc_Byte_Sice $Global:zLog_Copy_Size b $Global:Log_Copy_Size_Einheit), 2) -[String]$sLog_Copy_real_Size = [math]::round((Calc_Byte_Sice $Global:zLog_Copy_real_Size b $Global:Log_Copy_Size_Einheit), 2) -[String]$sLog_Copy_item = "$Global:zLog_Copy_item" -[String]$sLog_Copy_real_item = "$Global:zLog_Copy_real_item" -[String]$sLog_Copy_Size_Einheit = "$Global:Log_Copy_Size_Einheit" + [String]$sLog_Copy_errors = "$Global:zLog_Copy_errors" + [String]$sLog_Copy_Size = [math]::round((Calc_Byte_Sice $Global:zLog_Copy_Size b $Global:Log_Copy_Size_Einheit), 2) + [String]$sLog_Copy_real_Size = [math]::round((Calc_Byte_Sice $Global:zLog_Copy_real_Size b $Global:Log_Copy_Size_Einheit), 2) + [String]$sLog_Copy_item = "$Global:zLog_Copy_item" + [String]$sLog_Copy_real_item = "$Global:zLog_Copy_real_item" + [String]$sLog_Copy_Size_Einheit = "$Global:Log_Copy_Size_Einheit" -echo "Summary: $sLog_Copy_real_item of $sLog_Copy_item files copied, $sLog_Copy_errors errors, $sLog_Copy_real_Size $sLog_Copy_Size_Einheit of $sLog_Copy_Size $sLog_Copy_Size_Einheit copied" + echo "Summary: $sLog_Copy_real_item of $sLog_Copy_item files copied, $sLog_Copy_errors errors, $sLog_Copy_real_Size $sLog_Copy_Size_Einheit of $sLog_Copy_Size $sLog_Copy_Size_Einheit copied" } -- 2.47.1