tags:

views:

16

answers:

3

hi

cat > input
0,4880,1;1,8877,1;2,LT33A,0;3,2224,1;4,4926,1;

Output should be like below
0,4880,1
1,8877,1
2,LT33A,0
3,2224,1
4,4926,1

can anybody help me out

+1  A: 
tr ';' '\n' < input
Ignacio Vazquez-Abrams
extra newline at the end for OP's input sample
ghostdog74
Extra semicolon in the input. GIGO.
Ignacio Vazquez-Abrams
Extra newline can be easily removed with `tr -s ';' '\n' < input`.
schot
A: 

You can use sed as:

sed 's/;/\n/g' file
codaddict
extra newline at the end for OP's input sample
ghostdog74
A: 
$ echo "0,4880,1;1,8877,1;2,LT33A,0;3,2224,1;4,4926,1;" |awk -vRS=";" 'NF'
0,4880,1
1,8877,1
2,LT33A,0
3,2224,1
4,4926,1
ghostdog74