use variables for colored output
This commit is contained in:
parent
cec57c4f9e
commit
1c9e362ce0
3 changed files with 4 additions and 3 deletions
|
@ -123,7 +123,7 @@ fi
|
|||
if [[ $SUMMARY == csv ]] ; then
|
||||
echo "=====> BADBLOCKS CSV SUMMARY <====="
|
||||
cat $OUTPUT_DIR/badblocks.csv \
|
||||
| sed "s/^\([^|]\+\)/${BLD}\1${OFF}/ ; s/OK/${GRN}OK${OFF}/ ; s/FAIL/${RED}FAIL${OFF}/ ; s/RESULT/${BLD}RESULT${OFF}/ "
|
||||
| sed "s/^\([^|]\+\)/${BLD}\1${OFF}/ ; s/OK/$RES_OK/ ; s/FAIL/$RES_FAIL/ ; s/RESULT/$RES_ULT/ "
|
||||
# | sed 's/empty/W87152YGWGM/g' # Serial number for debugging
|
||||
fi
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ if [[ "$SUMMARY" != "0" ]] ; then
|
|||
done
|
||||
if [[ $SUMMARY == csv ]] ; then
|
||||
cat $OUTPUT_DIR/memtester.csv \
|
||||
| sed "s/^\([^|]\+\)/${BLD}\1${OFF}/ ; s/OK/${GRN}OK${OFF}/ ; s/FAIL/${RED}FAIL${OFF}/ ; s/RESULT/${BLD}RESULT${OFF}/ "
|
||||
| sed "s/^\([^|]\+\)/${BLD}\1${OFF}/ ; s/OK/$RES_OK/ ; s/FAIL/$RES_FAIL/ ; s/RESULT/$RES_ULT/ "
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ RED_BOLD=$'\e[31;1m'
|
|||
OFF=$'\e[0;0m'
|
||||
|
||||
RES_OK=${GRN}OK${OFF}
|
||||
RES_FAIL="${RED}FAIL${OFF}"
|
||||
RES_FAIL=${RED}FAIL${OFF}
|
||||
RES_ULT=${BLD}RESULT${OFF}
|
||||
#RES_FAIL_BLINK="${RED_BLINK}FAIL${OFF}"
|
||||
RES_FAIL_BIG="${RED_BOLD}######## FAIL ########${OFF}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue