Hi ,
Could you please guide me how to remove formatting (bold text) in a unix file?
vi editor showing like this...
^[[1mtl21ss01^[[0m
^[[1mtl21ss02^[[0m
^[[1mtl21ss03^[[0m
Cat command showing like this...
tl21ss01
tl21ss02
tl21ss03
Hi ,
Could you please guide me how to remove formatting (bold text) in a unix file?
vi editor showing like this...
^[[1mtl21ss01^[[0m
^[[1mtl21ss02^[[0m
^[[1mtl21ss03^[[0m
Cat command showing like this...
tl21ss01
tl21ss02
tl21ss03
awk -F"[" '{print $3}' <filename> | tr -d '1m' | tr -d '^'
If the data at the starting of the string wont change
It is giving result like..
0
0
0
try this..
perl -ne 's/\^.{1,7}?m//g;print' < input.txt > out.txt
sed 's/.\[[01]m//g' infile
sed 's/.\[[0-9]\{1,\}m//g' infile
Try this too...
perl -ne 's/\e\[\d+m//g;print' < input.txt > output.txt
perl -ne 's/\e\[\d+m//g;print' < input.txt > output.txt
IT IS WORKING.... THANK YOU ALL