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: a07f3367d7,31af760e939556ef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!p10g2000prm.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Interpretation of extensions different from Unix/Linux? Date: Thu, 20 Aug 2009 14:34:27 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <8a5f3b98-1c5a-4d47-aca7-e106d1223fa9@a26g2000yqn.googlegroups.com> <8763cj53ir.fsf@jspa-nykredit.sparre-andersen.dk> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1250804067 15691 127.0.0.1 (20 Aug 2009 21:34:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 20 Aug 2009 21:34:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p10g2000prm.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:6949 Date: 2009-08-20T14:34:27-07:00 List-Id: On Aug 20, 12:44=A0pm, Robert A Duff wrote: > If I say, "cp *.ada backup", it means copy all the *.ada files > into the backup directory. =A0Suppose I accidentally hit > before typing "backup", so I say, "cp *.ada". =A0On a reasonable > system, I'd get an error -- one argument passed, but 'cp' is > expecting two. =A0On Unix, I usually get an error, but it's > something nonsensical, like "zoo.ada is not a directory". > And if it just so happens that there are exactly two files > matching *.ada, I get no error -- instead of backing up > my files, it destroys one of them! Yup. That last feature can be a bit of a blessing, though, at least when you throw curly braces into the mix. A file name like abc {def,ghi,jkl}mno.ada is expanded by the shell to "abcdefmno.ada abcghimno.ada abcjklmno.ada", which is helpful if you want to refer to a set of files that differ only in parts of the names (or if you want to specify a set of files in some other directory, so that you don't have to type the path name repeatedly). But I often abuse that feature with commands like cp test1.ada{,.save} The shell expands the latter to "test1.ada test1.ada.save" and doesn't know that the two files it's expanding are going to have different purposes in the command. This is a little different from *, though, in that it's not exactly a wild card, and will be expanded in the same way with no regard to what files actually exist on your system. > (Why is the "search" command called "grep"? =A0For that matter, why is th= e > "help" command called "man"?) Well, the second should be obvious---if you can't figure out how to do what you want, you say, "Oh MAN, how do I use this *&^#@$*^ command???" -- Adam