![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Formatting a line of data into columns | nistleloy | UNIX for Dummies Questions & Answers | 3 | 05-12-2009 04:52 PM |
| writing data in a text file at particular line | punitpa | Shell Programming and Scripting | 2 | 04-14-2009 01:45 PM |
| Reading data from a specific line in a text file | jermaine4ever | Shell Programming and Scripting | 4 | 04-02-2009 04:21 AM |
| Reading data from a specific line in a text file | jermaine4ever | Shell Programming and Scripting | 1 | 04-01-2009 06:08 AM |
| accessing o an exact line in a file | walnut | Shell Programming and Scripting | 2 | 02-23-2006 04:31 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Formatting a text file to get data in exact line by line
I have my data something like this
Code:
SERIAL FIRSTOCCURRENCE
NETPROTOCOL
1947430693 07/01/2009 05:16:40
FR
SERIAL FIRSTOCCURRENCE
NETPROTOCOL
1947430746 07/01/2009 05:18:05
FR
Code:
SERIAL.......................FIRSTOCCURRENCE.........................NETPROTOCOL 1947430693...................07/01/2009 05:16:40.....................FR SERIAL.......................FIRSTOCCURRENCE.........................NETPROTOCOL 1947430746...................07/01/2009 05:18:05.....................ATM Any help will be much appreciated. -Ravi |
|
||||
|
Just some hints for now... the blank line is the trigger for record separation (as well as EOF). You can use awk. Collect up the data and when the trigger happens you can use printf in awk to format the output.
I'm just trying to get you to do the work, you'll learn more. Does that help? (without me or someone writing the code for you) |
| Sponsored Links | ||
|
|