Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!esosun!cogen!alen From: alen@cogen.UUCP (Alen Shapiro) Newsgroups: comp.unix.questions Subject: Re: Option Filenames Message-ID: <392@cogen.UUCP> Date: Fri, 20-Nov-87 15:53:09 EST Article-I.D.: cogen.392 Posted: Fri Nov 20 15:53:09 1987 Date-Received: Mon, 23-Nov-87 04:15:20 EST References: <3286@whuts.UUCP> Reply-To: alen@cogen.UUCP (Alen Shapiro) Distribution: na Organization: Cogensys, LaJolla, Calf. Lines: 30 In article <3286@whuts.UUCP> bear@whuts.UUCP (BELLIVEAU) writes: > >If a file in your directory is named "-i" and you try >to do an "rm *", then it will interpret "-i" as an option >to "rm" and start inquiring if you want to remove all the files. > >So if I put a "-l" filename in my directory and do an >"ls *", why doesn't it give me an "ls -l" output? >Does the 'argv' get interpreted differently in these two >sources? > >BTW....I am on a VAX 11/785 running SYSTEM 5.0.2 SV_R2 > or is it 5.2.2 ..... one of those... It does on sun OS/3. Are you sure the "-l" file is lexically first in your directory. Try "echo *" and see if the * substitution prints in directory order or lexical order. i.e. % touch a % touch b % cat > -l ^D % echo * a b -l If this is what is happening then ls * would not necessarily accept "-l" as an argument. BTW the above "echo *" gives "-l a b" on the sun. Does this mean that "*" involves a lexical argument sort in the csh? --alen the Lisa slayer (it's a long story)