[root@localhost~]# cat file 1 2 3 4 5 6 7 8 9 [root@localhost~]# cat file |xargs -n1 [root@localhost~]# xargs -n 1 <file [root@localhost~]# tr " " "\n" <file [root@localhost~]# sed 's/ /\n/g' file [root@localhost~]# grep -oP '\S+' file [root@localhost~]# awk '{for(i=1;i<=NF;i++)print $i}' file [root@localhost~]# awk -vOFS="\n" '$1=$1' file [root@localhost~]# awk '{OFS=RS}NF=NF' file 1 2 3 4 5 6 7 8 9