just have a file
1:2333 2:-09393 3:45453 4:-09999 5:-09933 6:93939
question is to get output by removing colons as well as number before each colon (in bold)
2333 -09393 45453 -09999 09933 93939
just have a file
1:2333 2:-09393 3:45453 4:-09999 5:-09933 6:93939
question is to get output by removing colons as well as number before each colon (in bold)
2333 -09393 45453 -09999 09933 93939
echo "1:2333 2:-09393 3:45453 4:-09999 5:-09933 6:93939" | sed 's/[0-9]://g'
# in a file
sed 's/[0-9]://g' file > newfile
Thanks tht command will help to remove when u have start from 0-9
what happen when u have after 10 uptp 50 and want to have to remove that part.
11:2222 12:3333 13 :-222 ...so on
when tried using the same sed[0-9]://g
then get output 12222 23333 3-222
so alternate option........
Try using split on ":" and printing out part 2
split($0,a,":"); print a[2]
echo "1:2333 2:-09393 3:45453 4:-09999 5:-09933 6:93939" | tr -d ":"
the above also will do..
-ilan
cat filename | sed 's/[0-9]*://g'