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 ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Solaris x86 FAQ 2/2 | Dan Anderson | Tech FAQ | 0 | 04-27-2004 08:24 PM |
| vi editor FAQ (Frequently Asked Question List), Part 2/2 | E. Larry Lidz | Tech FAQ | 0 | 04-19-2004 01:02 AM |
| vi editor FAQ (Frequently Asked Question List), Part 1/2 | E. Larry Lidz | Tech FAQ | 0 | 04-19-2004 01:02 AM |
| Apple II Csa2 FAQs: Telecom Hardware & Transfers, Part 20/25 | rubywand@swbell.net | Tech FAQ | 0 | 04-04-2004 08:29 AM |
| Solving Lazy Initialization and double checked locking problem | Vinay Aggarwal | Software Patterns | 19 | 02-18-2004 05:34 PM |