[X-Unix] Remove last ten lines of files

Eugene Lee list-themacintoshguy at fsck.net
Wed Jan 7 09:09:54 PST 2004


On Wed, Jan 07, 2004 at 08:48:30AM +0100, Kuestner, Bjoern wrote:
: 
: > echo '1,$-10p;q' | tr ";" "\n" | ed YOURFILE
: 
: The mystery deepens. (c:
: 
: I kinda feel like my wife right now when she looks at my screen and
: thinks I am doing total magic.

Or shorten the command to:

	echo $'1,$-10p\nq' | ed YOURFILE


-- 
Eugene Lee
http://www.coxar.pwp.blueyonder.co.uk/



More information about the X-Unix mailing list