Re: strange ( * vs ./* )

2014-04-09 Thread Amos Shapira
Good catch Matan. Another way to avoid this is to add "--" (two dashes) after all the flags and before the file names to tell grep that everything after it is a file name. On 10 Apr 2014 00:38, "Erez D" wrote: > > > > On Wed, Apr 9, 2014 at 1:17 PM, Matan Ziv-Av wrote: > >> On Wed, 9 Apr 2014, E

Re: strange ( * vs ./* )

2014-04-09 Thread Erez D
On Wed, Apr 9, 2014 at 1:17 PM, Matan Ziv-Av wrote: > On Wed, 9 Apr 2014, Erez D wrote: > > erez@homer:~$ grep pppd * >> erez@homer:~$ >> >> however: >> >> erez@homer:~$ grep pppd ./* >> ./chat.sh:pppd connect 'chat -v -s ABORT ERROR ABORT' >> > > Do you have a file whose name starts with a dash

Re: strange ( * vs ./* )

2014-04-09 Thread Oleg Goldshmidt
Matan Ziv-Av writes: > On Wed, 9 Apr 2014, Erez D wrote: > >> erez@homer:~$ grep pppd * >> erez@homer:~$ >> >> however: >> >> erez@homer:~$ grep pppd ./* >> ./chat.sh:pppd connect 'chat -v -s ABORT ERROR ABORT' > > Do you have a file whose name starts with a dash (-)? Definitely a candidate... S

Re: strange ( * vs ./* )

2014-04-09 Thread Matan Ziv-Av
On Wed, 9 Apr 2014, Erez D wrote: erez@homer:~$ grep pppd * erez@homer:~$ however: erez@homer:~$ grep pppd ./* ./chat.sh:pppd connect 'chat -v -s ABORT ERROR ABORT' Do you have a file whose name starts with a dash (-)? -- Matan Ziv-Av. ma...@svgalib.org _

Re: strange ( * vs ./* )

2014-04-09 Thread Amos Shapira
Perhaps something fishy with the shell glob expansion options. What does "echo *" give vs "echo ./*"? On 9 April 2014 19:52, Erez D wrote: > erez@homer:~$ grep pppd * > erez@homer:~$ > > however: > > erez@homer:~$ grep pppd ./* > ./chat.sh:pppd connect 'chat -v -s ABORT ERROR ABORT' > > and: >

Re: strange ( * vs ./* )

2014-04-09 Thread Valery Reznic
Strange indeed. And what is output of: echo * and echo ./* > > From: Erez D >To: linux-il >Sent: Wednesday, April 9, 2014 12:52 PM >Subject: strange ( * vs ./* ) > > > >erez@homer:~$ grep pppd * >erez@homer:~$ > >

strange ( * vs ./* )

2014-04-09 Thread Erez D
erez@homer:~$ grep pppd * erez@homer:~$ however: erez@homer:~$ grep pppd ./* ./chat.sh:pppd connect 'chat -v -s ABORT ERROR ABORT' and: erez@homer:~$ grep pppd chat.sh pppd connect 'chat -v -s ABORT ERROR ABORT' strange !!! btw: erez@homer:~$ echo $SHELL /bin/bash erez@homer:~$ cat /etc/iss