![]() |
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 |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What the command to find out the record length of a fixed length file? | tranq01 | UNIX for Dummies Questions & Answers | 9 | 12-04-2008 04:04 PM |
| Record Length too long -- AWK Problem | venkatajay_18 | Shell Programming and Scripting | 2 | 03-05-2007 04:15 PM |
| fl command - set record length | Tom Siegel | Shell Programming and Scripting | 2 | 07-17-2006 09:50 AM |
| fixed record length | george_ | Shell Programming and Scripting | 16 | 03-28-2006 05:41 AM |
| Parsing a variable length record | Barb | UNIX for Dummies Questions & Answers | 17 | 10-01-2004 08:37 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hello -
QUESTION: Is there a way to override the default record length limitation over awk in Unix? Or, is there a better way to do what I am trying to do than the way I am trying to do it now? (See BACKGROUND and CURRENT PROCEDURE below...) BACKGROUND: In a Kornshell script, I have to search a file using variable criteria and produce a range of records from within the original input file. I am piping the file from Unix Kornshell commands to an awk procedure. I basically want to extract a range of records out of the original file, based on input criteria. PROBLEM: Awk is relaying to me that the record is too long to process. CURRENT PROCEDURE: To overcome the length problem, I am "cut"-ting the records as I pipe them to the awk procedure, and that is working OK - - I do get the expected output from the procedure. But then I have to use a Unix "grep" with the output of the awk procedure against the original file to put the selected records from the file 'back together' with the original. Consequently, the "grep" is taking too long (it is an interactive script). Is there a better way to do this? - - FYI: The original records are a bit over 7000 bytes in length. The "cut" records passed to and output from awk are 50 bytes. - - Thanks, Jim |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|