ECHO NEXT LINE IN LINUX BASH

You want to copy some text or numbers but there should be one number or string per line. How would you do that? Use printf to easily redirect text or number with next line to a file

[root@orcl oracle]# printf "1\n2\n3\n4\n5\n6" > numbers

cat the output file

[root@orcl oracle]# cat numbers
1
2
3
4
5
6

Leave a Reply