![]() |
|
|
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 |
| How to split pipe delimited file | njgirl | Shell Programming and Scripting | 4 | 06-18-2008 06:15 PM |
| Help needed in removing intermediate segments from a pipe delimited segment file | naren_0101bits | Shell Programming and Scripting | 3 | 12-03-2007 11:54 AM |
| how to extract a tilde delimited file in unix | trichyselva | Shell Programming and Scripting | 12 | 03-06-2007 12:19 AM |
| Grep for NULL in a pipe delimited file | sureshg_sampat | Shell Programming and Scripting | 5 | 11-21-2006 06:15 AM |
| Converting Tab delimited file to Comma delimited file in Unix | charan81 | Shell Programming and Scripting | 22 | 01-20-2006 09:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
splitting a pipe delimited file in unix
Could one of you shad some light on this:
I need to split the file by determining the record count and than splitting it up into 4 files. Please note, this is not a fixed record length but rather a "|" delimited file. I am not sure as how to handle reminder/offset for the 4th file. For example: "$1|wc -l" /4 + reminder Please let me know. ![]() |
|
||||
|
My file for ex. is a 10mil record file. Within the shell script I need to determine the record count and divided it into 4 separate files.
Is it ok to do a wc -l into a variable / 4? Would reminder take care of itself - meaning it will be a part of the 4th file. Please advise and I hope this helps. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|