--See ' man dd ' (sorry, I haven't done this application myself so all I can do is point.)
See ' man grep ' -- ' grep -b ' will do exactly this.
Originally Posted by garyng
Just want to ask if there is readily available command to 'cut out' a part of a file, say from offset 12345 till end of file ?
another similar problem, any readily available command to 'grep' the first string occurrence in a file and return its offset.
I know I can write a perl script for that but just wondering if there is already something in the standard tool set.
--See ' man dd ' (sorry, I haven't done this application myself so all I can do is point.)
See ' man grep ' -- ' grep -b ' will do exactly this.
Originally Posted by garyng
thanks, the 'grep -b' option only works if the input is considered to be text and in my case it is binary and grep only want to say "match/not match"
Anyway, it seems to be pretty easy in perl so I went that route.
--Cool. If you could post your code, it might be of help to others...
Originally Posted by garyng
perl -e '$/="---unique seperator---";$i=0; while (<>) { print $_ if ($i++);}' combined_file
Vintage Compaq Presario 5000 Celeron 600 WIN 98 66MHz 255MB RAM 80GB HDD
$75.00
Vintage Keytronic PC/AT VT Switch FCC ID:CIG8AVE03435 TESTED WORKING
$30.00
NMB KEYBOARD RT2258TW NMB PS/2 BEIGE 121944-101 REV A VINTAGE NEW OLD STOCK
$25.99
Toshiba T1100 Plus Personal Computer w/Bag And Manuals VINTAGE (no Power Supply)
$99.00
Vintage COMPUTER LANGUAGE Magazine Lot 1984 Premier Issue CompuPro 7 Issues 1985
$65.00
Vintage SCCS Interface Microcomputer Magazine Pair 1976 IMSAI 8080 Altair 8800
$26.00
Vintage IBM P/S2 Keyboard KB-7953
$19.95
Tandy 200 Vintage Portable Computer 26-3860 w/ Manuals
$189.99
Vintage Atari 1040STf Computer with Mouse and Box, Minimal Testing, Pls Read
$149.99
VINTAGE 1992 NEWPORT SYSTEMS 700-0002-001 REV E GREAT CONDITION
$99.99