![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ksh Storing Multiple Files and reading each line in each file. | developncode | UNIX for Dummies Questions & Answers | 1 | 04-08-2008 01:44 PM |
| Splitting the data and storing it into 2 variables | jisha | Shell Programming and Scripting | 10 | 02-17-2008 07:40 PM |
| unzip particular gzip files among the normal data files | thepurple | Shell Programming and Scripting | 4 | 11-30-2007 08:17 AM |
| Storing data of files | Fr0z3n999 | UNIX for Dummies Questions & Answers | 1 | 12-09-2006 06:47 PM |
| awk - storing data in variables | 2nilotpal | Shell Programming and Scripting | 7 | 04-16-2004 02:32 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Storing data to many files
Please help me store the content of Input file to many files.
Input file: record a b c record d record e f record ..... Create file1: a b c Create file2: d Create file3: e f etc. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Code:
awk 'BEGIN { ORS=""; RS="record\n"; } NR>1 { print > "file" ++i; }' input_file.txt
|
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|