![]() |
|
|
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 |
| Real smart question | Peterh | UNIX for Advanced & Expert Users | 2 | 07-25-2005 12:24 PM |
| Smart Crash Handling | d11wtq | UNIX for Dummies Questions & Answers | 0 | 07-05-2005 08:35 AM |
| Smart Array on a RP4440 | marvin51796 | UNIX for Advanced & Expert Users | 1 | 03-21-2005 05:04 PM |
| compaq smart array 532 | farmacy | SCO | 2 | 02-18-2004 10:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
assuming your input file is in_file. You could code something like this Code:
#! /usr/bin/ksh
size=$(wc -c in_file | awk -F " " '{print $1}')
half_size=`expr $size / 2`
split -b $half_size in_file
The result of the final split command will be two or three files name xaa, xab and xac. you will get two files if the in_file is even number in size else three files with the last file xac being just 1 byte. If you wanted the first half just read xaa, else read xab and xac if available for the latter. jerardfjay Last edited by jerardfjay; 06-30-2005 at 04:48 PM.. Reason: more explanation |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|