From owner-freebsd-questions@FreeBSD.ORG Sun Feb 1 23:19:13 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 F101F106564A for ; Sun, 1 Feb 2009 23:19:13 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id BD4A58FC1E for ; Sun, 1 Feb 2009 23:19:13 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so1255602wfg.7 for ; Sun, 01 Feb 2009 15:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=1kOH5VklNBYDm/WmSJXhuh4D7/pg3UXxZI9CipTLnGQ=; b=iZvk3qdzc32aQa7Q5oyBREAqqLeTwqrFZz4P8datzoM69n0IZjdjRa/vktlSmvxj7e fM7A2FZ+Jm99NGgrb+MzJYl551hhHIrOOW2eTJ5XQ4/1/ac4Ygz+H1LwJTpbDOHDG9pE H5yaHjFE/2dUbkD9xMzFfVzp6t/QR1SA+2HQU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=UOK6tVcx146ZjNo8svrez1umT9FSrgxcvaPziHrZUBxBvQ+uyTVgrZp6Vc2DTcJHAo 7YdAYfNd5c+11CuCB6Lp6xgSzZ5qo88LU5AoSXIsWXnQYTIrLxwdQO8lrct0g2tmrYd7 qmcJh1v1xVWvhb+EvUhJOLFSj+b7lZ0GCkToI= Received: by 10.143.42.6 with SMTP id u6mr1553977wfj.121.1233530353390; Sun, 01 Feb 2009 15:19:13 -0800 (PST) Received: from aargh.lan (ool-182fcc8b.dyn.optonline.net [24.47.204.139]) by mx.google.com with ESMTPS id 30sm4835993wfg.25.2009.02.01.15.19.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 01 Feb 2009 15:19:12 -0800 (PST) Message-ID: <49862DEE.4050000@gmail.com> Date: Sun, 01 Feb 2009 18:19:10 -0500 From: Eitan Adler User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 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.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 23:19:14 -0000 Polytropon wrote: > Dear list, > > 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. > > Is there such a tool, or any other ideas? If I understand correctly you are looking for split(1). -p pattern The file is split whenever an input line matches pattern, which is interpreted as an extended regular expression. The matching line will be the first line of the next output file. This option is incompatible with the -b and -l options. -- Eitan Adler "Security is increased by designing for the way humans actually behave." -Jakob Nielsen