mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
code cleanup for sed for logging
This commit is contained in:
parent
80f2f2a508
commit
7745b3c004
2
inxi
2
inxi
|
@ -779,7 +779,7 @@ log_function_data()
|
|||
# Create any required line breaks and strip out escape color code, either ansi (case 1)or irc (case 2).
|
||||
# This pattern doesn't work for irc colors, if we need that someone can figure it out
|
||||
if [[ $B_LOG_COLORS != 'true' ]];then
|
||||
echo -e "${spacer}$logged_data" | sed 's/\x1b\[[0-9]\{1,2\}\(;[0-9]\{1,2\}\)\{0,2\}m//g' >> $LOG_FILE
|
||||
echo -e "${spacer}$logged_data" | sed -r 's/\x1b\[[0-9]{1,2}(;[0-9]{1,2}){0,2}m//g' >> $LOG_FILE
|
||||
else
|
||||
echo -e "${spacer}$logged_data" >> $LOG_FILE
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue