Oh! bash is confusing (was Re: [Ilugc] bash escape - use quotes)

  • From: suraj@xxxxxxxxxxx (suraj)
  • Date: Mon, 16 Feb 2004 05:59:27 -0800

Sridhar R wrote on Mon, Feb 16, 2004 at 05:37:04AM -0800: 
,----
| $ touch a##b
| $ rm a##b  # works
`----

did you do ls? you would have  seen a file named 'a'. so you created a
fil named 'a' and removed a file named 'a'. Not 'a##b' :)

,----
| $ touch ^V^G^V^G
| $ rm ??    # works! sigh!
`----

DANGEROUS! All two lettered files will be deleted.

,----
| But now, for `touch ^V^G^V^G` it works.  Bash is very confusing!
`----

i think you weren't deleting by wild-cards last time. Were you?

cheers,

  -Suraj

-- 
,-----------------[http://www.symonds.net/~suraj/]---o
| The average time between blinks of the eye is 2.8 seconds.
`------------------------------[suraj@xxxxxxxxxxx]---o

Other related posts: