Gery
1
Hello and Happy New Year 2012!
I have this example:
1,2,3 4,5,6 7,8,9
For that, I'm trying to get:
1,2,3
4,5,6
7,8,9
for that, I think this might work but doesnt work so far:
awk '{for(i=1;i=NF;i++);sub(/\//,"",$i);print $i}' myfile
Any help is very grateful, thanks
Hi,
Happy new year !
how about in sed:
echo "1,2,3 4,5,6 7,8,9" | sed 's/ /\n/g'
output:
1,2,3
4,5,6
7,8,9
or try this awk:
echo "1,2,3 4,5,6 7,8,9" | awk 'BEGIN { RS=" ";ORS="\n" }{print $0}'
Gery
3
Thank you so much greet_sed!! your codes are great! sed works fantastic!!!
Happy New Year to you!