From owner-freebsd-questions@FreeBSD.ORG Sun Feb 1 18:47:04 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AEA7106566B for ; Sun, 1 Feb 2009 18:47:04 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9C02C8FC0C for ; Sun, 1 Feb 2009 18:47:03 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id n11IkW1w044527; Sun, 1 Feb 2009 18:46:44 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.1 smtp.infracaninophile.co.uk n11IkW1w044527 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1233514005; bh=b1ZmyyBR9lutokoCYS3qQI1/05iXTE2IjXy6FAbkk+Q=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4985EE02.5030001@infracaninophile.co.uk>|Date:=20S un,=2001=20Feb=202009=2018:46:26=20+0000|From:=20Matthew=20Seaman= 20|Organization:=20Infracaninophi le|User-Agent:=20Thunderbird=202.0.0.19=20(X11/20090125)|MIME-Vers ion:=201.0|To:=20Polytropon=20|CC:=20FreeBSD=20Q uestions=20|Subject:=20Re:=20Tool=2 0to=20uncat=20file|References:=20<20090201140102.e9a9a41a.freebsd@ edvax.de>|In-Reply-To:=20<20090201140102.e9a9a41a.freebsd@edvax.de >|X-Enigmail-Version:=200.95.6|Content-Type:=20multipart/signed=3B =20micalg=3Dpgp-sha256=3B=0D=0A=20protocol=3D"application/pgp-sign ature"=3B=0D=0A=20boundary=3D"------------enigDAC664FFC332328ECE7A E08D"; b=3ENHiGQwdo21+o87y42J0qf8OXYpm7evJHPC6XIundiHOFz1TwNp1HQO9Jvyg/R41 nhEGH6wgL2gnWluBTKYff0a3dAF4n5d8nHDaUjtr5LwDqevHcTWaRW2LtZJkDDx6ZC 6eQ9KGoGiQeIMdXr+o4ddf1fe/hFzZnLE78rEuXw= Message-ID: <4985EE02.5030001@infracaninophile.co.uk> Date: Sun, 01 Feb 2009 18:46:26 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.19 (X11/20090125) MIME-Version: 1.0 To: Polytropon References: <20090201140102.e9a9a41a.freebsd@edvax.de> In-Reply-To: <20090201140102.e9a9a41a.freebsd@edvax.de> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigDAC664FFC332328ECE7AE08D" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (smtp.infracaninophile.co.uk [IPv6:::1]); Sun, 01 Feb 2009 18:46:45 +0000 (GMT) X-Virus-Scanned: ClamAV 0.94.2/8935/Sun Feb 1 15:43:52 2009 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: FreeBSD Questions Subject: Re: Tool to uncat file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2009 18:47:04 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDAC664FFC332328ECE7AE08D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Polytropon wrote: > Dear list, >=20 > before starting to code on my own, I'd like to ask if there's already a= > tool to uncat files, defining the file separation position as a string > of bytes, usually given in hexadecimal form. >=20 > An example could be this: >=20 > % uncat -p 0x12,0x52,0xf1,0x09 file_orig >=20 > It creates file_1 file_2 file_3. And, of course, >=20 > % cat file_1 file_2 file_3 > file_orig >=20 > would re-create the original file. The bytes 0x12,0x52,0xf1,0x09 tell t= he > file starting pattern (-p), where a new file begins. >=20 > I cannot use dd due to the fact that the files concatenated are of a > different size. So the idea would be to look for specific byte pattern > and then start a new file each time it occurs on input. >=20 > Is there such a tool, or any other ideas? csplit(1) Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enigDAC664FFC332328ECE7AE08D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkmF7ggACgkQ8Mjk52CukIxiVACbBn5/QUqoEik6LFxpyd9tCvdG +2IAoIhsVAm12CDZZldBI9PMElf1O2/K =KLBT -----END PGP SIGNATURE----- --------------enigDAC664FFC332328ECE7AE08D--