Index: test/logs_rotation.sh =================================================================== diff -u -r06250a86799a3f765d41148f0d01d4a10bf3817e -rb606feb3c2230cc4053231ea7de71839011dd0ab --- test/logs_rotation.sh (.../logs_rotation.sh) (revision 06250a86799a3f765d41148f0d01d4a10bf3817e) +++ test/logs_rotation.sh (.../logs_rotation.sh) (revision b606feb3c2230cc4053231ea7de71839011dd0ab) @@ -1,7 +1,6 @@ #!/bin/sh # ---------- constants ---------- - PRINTF_SAME_LINE=1 LOG_FILE_SIZE_MB="bs=1024 count=10k" @@ -14,6 +13,7 @@ OPT_TYPE="-t" OPT_YEAR="-y" OPT_PCNT="-%" +OPT_CRLF="-r" LOG_DAY_MIN=1 LOG_DAY_MAX=28 @@ -132,12 +132,13 @@ echo " $OPT_TYPE log type to test" echo " $OPT_YEAR starting year of the file creation date" echo " $OPT_PCNT the optional max percentage of the partition to fill" + echo " $OPT_CRLF the optional option to print each status on next line" echo echo "Usage example" - printf "$format" "$0" "$OPT_TYPE$LOG_TYPE_NAME_LOG" "[-y2000]" "[-%85]" - printf "$format" "$0" "$OPT_TYPE$LOG_TYPE_NAME_ERR" "[-y2000]" "[-%85]" - printf "$format" "$0" "$OPT_TYPE$LOG_TYPE_NAME_CLD" "[-y2000]" "[-%85]" - printf "$format" "$0" "$OPT_TYPE$LOG_TYPE_NAME_TXR" "[-y2000]" "[-%30]" + printf "$format" "$0" "$OPT_TYPE$LOG_TYPE_NAME_LOG" "[-y2000]" "[-%85] [-r]" + printf "$format" "$0" "$OPT_TYPE$LOG_TYPE_NAME_ERR" "[-y2000]" "[-%85] [-r]" + printf "$format" "$0" "$OPT_TYPE$LOG_TYPE_NAME_CLD" "[-y2000]" "[-%85] [-r]" + printf "$format" "$0" "$OPT_TYPE$LOG_TYPE_NAME_TXR" "[-y2000]" "[-%30] [-r]" exit 0 } @@ -195,6 +196,10 @@ log_year="$param" log_year="${log_year:${#OPT_YEAR}}" ;; + + $OPT_CRLF) + PRINTF_SAME_LINE=0 + ;; $OPT_HELP) displayHelp