
- Forum
- Operating Systems
- Shell Programming
- Want in Separate Line
Want in Separate Line
This is a discussion on Want in Separate Line within the Shell Programming forums, part of the Operating Systems category; I am struck with a task in my UNIX operating system. I have thousands of files. What I want to ...
-
Want in Separate Line
I am struck with a task in my UNIX operating system. I have thousands of files. What I want to do is I want to read all these files and get the output from these files with each word written in a separate line. I want this to be done to input this output to a database further for processing. Kindly help me or guide me to achieve the desired output.
-
You can try awk programming as below:
awk '{ for(x=2;x<=NF;x++) print $1, $x }' filename
By using the above you could read all your files and get the output from these files with each word written in a separate line. Try out and let us know for further needs.

Reply With Quote





