dear friends I want to convert four column data to one column data. For example:
from
1, 2, 3, 4
5, 6, 7, 8
to
1
2
3
4
5
6
7
8
what is the general command for that type of convertion.
thanks
dear friends I want to convert four column data to one column data. For example:
from
1, 2, 3, 4
5, 6, 7, 8
to
1
2
3
4
5
6
7
8
what is the general command for that type of convertion.
thanks
sed 's/, /\n/g' file
tr ',' '\n' < filename
cat file.txt |tr ',' '\n' | tr -d ' '
Or even (getting rid of the space characters first):
sed -e "s/ //g" filename | tr ',' '\n'
The Perl way
perl -pe 's/, /\n/g' filename