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

Intel Core i7-6700 SR2L2 3.40GHz 8 MB 4-Core LGA1151 Socket CPU Processor
$27.99
INTEL CORE I9-10940X X-SERIES PROCESSOR | 3.30GHZ | SRGSH
$179.99
AMD Ryzen 7 2700X 8-Core 3.7GHz Socket AM4 CPU Processor YD270XBGAFBOX
$95.00
Intel Core i5-4590T 2 GHz 5 GT/s LGA 1150 Desktop CPU Processor SR1S6
$10.99
Intel Core i7-3770K 3.5 GHz Processor
$39.00
Intel Core i5-12500T SRL5W 2GHz 18MB 6 Core Socket LGA1700 Desktop CPU Processor
$114.99
Intel Xeon E3-1230 v3 SR153 3.3GHz Quad Core LGA 1150 CPU Processor
$14.49
Intel Core i7-7700K SR33A 4.20GHz 4-Core LGA1151 CPU Processor
$62.95
Lenovo ThinkCentre M920s SFF Barebones PC Motherboard PSU DVD No CPU RAM SSD
$27.99
Intel Core i5-12500T 2.00 GHz LGA 1700 Desktop CPU Processor SRL5W
$119.99