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

Cisco C9400-LC-24XS Catalyst 9400 24-Port 10G SFP+ Line Card Module NEW SEALED
$2804.00
Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch
$129.99
Cisco Catalyst C9130AXI-B WiFi 6 802.11ax Wireless Access Point Brand New
$101.99
Cisco Acacia DP04QSDD-E25-840 400G QSFP-DD Coherent DCO Transceiver Module
$699.99
CISCO Services Router C891F-K9, Grade B, SKU 16188
$24.94
Genuine Cisco SFP-10G-SR 0-2415-03 10 Gigabit Transceiver
$5.40
Cisco Catalyst WS-C3560CX-8PC-S Managed Switch 8 PoE+ Port | Quantity Available
$97.49
Cisco Nexus N9K-C92160YC-X 48P 25GbE SFP28 6P QSFP+/QSFP28 PE Switch
$439.00
Cisco Catalyst 2960x (WS-C2960X-48FPD-L) 48 Port POE Rack Mount Switch Brand New
$399.99
Cisco Catalyst WS-C2960+24TC-S 24-Port Gigabit Managed SFP Switch
$39.99