--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

Computer History UNIVAC IBM 650 Apple 1 Macintosh DEC PDP-8 Altair 8800 Babbage
$38.00
Computer Photo History Altair 8800 Cray-1 UNIVAC 1103 Apple 1 CDC 6600 IBM SAGE
$65.00
S-100 Bus Handbook Altair 8800 IMSAI 8080 Board Schematics Xitan Pertec Cromemco
$89.99
S-100 Vector Graphic 64K Ram Board (Altair, IMSAI)
$99.95
S-100 Vector Graphic 12K PROM/RAM Board (Altair, IMSAI)
$99.95
Vintage Digital Research ZSID 1.4 8" Floppy Disk CP/M Z80 Software S-100 Altair
$69.99
Intel 4004IBM Mark 1 UNIVAC Cray-1 Babbage ENIAC Apple 1 Steve Jobs MITS Altair
$50.99
Morrow MIS S-100 20 Slot Backplane PDC Motherboard 1977 Altair IMSAI Board
$295.00
CP/M 86 1.1R 8086 Highmonitor 8 Inch Floppy Diskette 80s IMSAI Altair
$29.99
ALTAIR Bitcoin Mining Solutions PDU IEC SERIES 100-250V 30A/24A Power Distribute
$99.00