Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!slxsys!ibmpcug!dylan From: dylan@ibmpcug.co.uk (Matthew Farwell) Newsgroups: comp.unix.programmer Subject: Re: filters Message-ID: <1990Dec20.132240.19103@ibmpcug.co.uk> Date: 20 Dec 90 13:22:40 GMT References: <1990Dec4.103255.14195@dce.ie> <109685@convex.convex.com> <10763:Dec221:21:1590@kramden.acf.nyu.edu> <1990Dec4.105612.14422@dce.ie> <1990Dec5.014313.28592@ibmpcug.co.uk> <1990Dec15.175917.27136@comm.wang.com> Reply-To: dylan@ibmpcug.CO.UK (Matthew Farwell) Organization: The IBM PC User Group, UK. Lines: 47 In article <1990Dec15.175917.27136@comm.wang.com> lws@comm.wang.com (Lyle Seaman) writes: >dylan@ibmpcug.co.uk (Matthew Farwell) writes: >>Sorry, but I find typing 'cat foobar' quite a bit easier than typing >>'dd if=foobar of=/dev/tty bs=512'. Strange, I know, but its this little >>idiosyncracy of mine. >> [ ... etc ... ] >So write an alias or a shell script if you want that special functionality. >There's no point in burdening the world with {code, documentation, user >interface} bloat for the sake of features that are adequately provided >elsewhere. Yes I will straight away. Now lets see..... -rwx--x--x 1 bin bin 9525 Apr 13 1987 /bin/cat* Now if I write a shell script called 'cat' such as: #!/bin/sh if [ $# = 0 ] then dd bs=512 2> /dev/null else for i in $* do dd if=$i bs=512 2> /dev/null done fi (apologies for my shell programming if its wrong) -rwx--x--x 2 bin bin 47228 Jul 13 1988 /bin/sh* Ok, so my super-duper shell script should work brilliantly for cat. Ok, it'll take longer to load + execute, and on some machines i can't exec() it, but I can rewrite my code to get round that can't I? All for 9k's worth of disk space. Sigh, I don't know, some people..... Dylan. p.s. Sorry, I forgot the documentation too. On my machine, that comes to an extra 1.5k. Even more savings!!!!! -- Matthew J Farwell | Email: dylan@ibmpcug.co.uk The IBM PC User Group, PO Box 360,| ...!uunet!ukc!ibmpcug!dylan Harrow HA1 4LQ England | CONNECT - Usenet Access in the UK!! Phone: +44 81-863-1191 | Sun? Don't they make coffee machines?