🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #891

Shell globbing and redirection (Was Re: BBC micro)

#891
From: Charles Green
Date: Sun, 14 Jan 1990 03:52
15 lines
1236 bytes
[Followups redirected to comp.unix]

In article <wZfVc0200...@andrew.cmu.edu> sa...@andrew.cmu.edu (Sudheer Apte) writes:
>not SHIFT'ing in time when typing "rm *.o", getting "rm *>o", and
>claimed that you get just one empty file named "o".  Actually, the
>shell creates the file "o" before calling rm, so the command unlinks
>that, too;  you get nothing at all in your directory.

Ah, but the shell also expands '*' before calling rm!  The question is,
which does it do first?

[Exercise is left to the reader.]
[Hint:  "the shell" is misleading.]
-- 
cha...@C3.COM	{decuac.dec.com,cucstud}!c3pe!charles	ex::!echo Boo:
Technical Details
Message-ID: <8289@c3pe.UUCP>
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!cucstud!c3pe!charles
References: <wZfVc0200WB68G8m1a@andrew.cmu.edu>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!cucstud!c3pe!charles
From: charles@c3pe.UUCP (Charles Green)
Newsgroups: alt.folklore.computers
Subject: Shell globbing and redirection (Was Re: BBC micro)
Summary: csh and sh do it in different order!
Message-ID: <8289@c3pe.UUCP>
Date: 14 Jan 90 03:52:49 GMT
References: <wZfVc0200WB68G8m1a@andrew.cmu.edu>
Reply-To: cha...@c3pe.C3.COM (Charles Green)
Followup-To: comp.unix
Organization: C3 Incorporated, Herndon, VA
Lines: 15
Posted: Sun Jan 14 04:52:49 1990
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit