From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e219d94b946dfc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Brian May Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <545bgvF1ttrphU1@mid.individual.net> <1495406.QZvfpqijrQ@linux1.krischik.com> <6dy7mn3hhu.fsf@hod.lan.m-e-leypold.de> <1172328891.5496.62.camel@localhost.localdomain> <58xeclb9d.fsf@hod.lan.m-e-leypold.de> Date: Tue, 06 Mar 2007 14:48:30 +1100 Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.19 (linux) Cancel-Lock: sha1:FrLoXhs5tRAS8u0gQ7xGM1RylYs= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: snoopy.microcomaustralia.com.au X-Trace: quokka.wn.com.au 1173152888 202.173.153.89 (6 Mar 2007 12:48:08 +0800) X-Complaints-To: abuse@westnet.com.au Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!quokka.wn.com.au!not-for-mail Xref: g2news2.google.com comp.lang.ada:9705 Date: 2007-03-06T14:48:30+11:00 List-Id: >>>>> "Markus" == Markus E Leypold writes: Markus> was planning to write a little essay "And Unix does it Markus> bloody right after all!" (in which I correct all those Markus> misconception, write useful things about Unix shell usage Markus> and philosophy and post a link here). Alas -- it will not To be fair, Unix does have issues, e.g. - lots of incompatible standards. "The problem with standards is that there are so many to choose from!" - easy to shoot yourself in the foot, especially for a beginner - but even experienced people can do this too. e.g accidental space changes the meaning of the command: > rm -rf / path/to/my/directory I thought the target directory was optional: > mv ../file* instead of "mv ../file* ." expanded into "mv ../file.c ../file.c.bak" which wasn't what I wanted - fortunately, after studying the screen for about five minutes (I was inexperienced) I suddenly realized I hadn't lost *any* of my work (my tutor said I had lost everything). on auto-pilot, typing in the wrong command: > rm /etc/init.d/network instead of > vim /etc/init.d/network whoops! *don't* do this automatically from a script: > deluser --remove-home abcd For why, see: http://bugs.debian.org/190427 (deluser may have been improved to make it more robust against this error). - there are probably lots of shell scripts that break when given filenames containing spaces, even though space is a legal filename character. The POSIX shell standard doesn't always make it easy when dealing with such files. - the shell is often overused when spawning external commands from non-shell languages in order to parse the command line (e.g. the only way to spawn a command from PHP is via the shell) - this not only can break filenames with spaces too (if not done correctly) but can result in obscure security holes. However, its what I am use to, what I like, and much better then anything ever produced by Microsoft. -- Brian May