Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Feb 2009 18:46:26 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Polytropon <freebsd@edvax.de>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Tool to uncat file
Message-ID:  <4985EE02.5030001@infracaninophile.co.uk>
In-Reply-To: <20090201140102.e9a9a41a.freebsd@edvax.de>
References:  <20090201140102.e9a9a41a.freebsd@edvax.de>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?4985EE02.5030001>