Re: confused with BASH shell in Redhat

From: /dev/rob0 (rob0_at_gmx.co.uk)
Date: 08/22/03


Date: Fri, 22 Aug 2003 06:33:10 -0700


[comp.unix.shell, which I do not read, added, followup-to set there]
In article <bi50pu$1pm6$2@mail.cn99.com>, Ka wrote:
> I am confused with Bash, why ?

All that crossposting, yet you somehow missed comp.unix.shell. Why?

Try this:
    http://www.google.com/search?as_q=bash+tutorial&as_oq=beginner+newbie+starting

> I am now confused with bash even I have played with it very well~~~
> what is wrong ??

You didn't play as well as you thought. :)

Despite being way off topic (in c.o.l.networking, where I read it) I'll
give you your answer.
    rob0@obrien:~$ mkdir '\-=New Game=\-'
    rob0@obrien:~$ echo "$_"
    \-=New Game=\-
    rob0@obrien:~$ cd "$_"
    rob0@obrien:~/\-=New Game=\-$ cd
    rob0@obrien:~$ rmdir "$_"
    rob0@obrien:~$ echo 'good riddance to non-standard filename characters!'

The problem is that the backslashes themselves either need another
backslash (escape), or quoting. Notice the use of escapes and quoting
above: single- and double-quotes act differently.

-- 
  /dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
  or put "not-spam" or "/dev/rob0" in Subject header to reply


Relevant Pages

  • Re: confused with BASH shell in Redhat
    ... All that crossposting, ... The problem is that the backslashes themselves either need another ... backslash (escape), or quoting. ... Notice the use of escapes and quoting ...
    (comp.unix.shell)
  • Re: confused with BASH shell in Redhat
    ... All that crossposting, ... The problem is that the backslashes themselves either need another ... backslash (escape), or quoting. ... Notice the use of escapes and quoting ...
    (comp.os.linux.networking)
  • Re: pygame music, cant read mp3?
    ... format is to use backslashes as separators, ... escaped in python's regular string literals, ... only because you've been lucky in not having escape characters following ... Notice that the \ gets doubled automatically by python in many ...
    (comp.lang.python)
  • Re: get only filenames and not directory names under a specific path.
    ... > I'm guess maybe it's must do that when it's double quotes. ... but with two exceptions: the escape character itself ... the string delimiter can also be escaped to allow embedded single quotes, ... means that a path with a trailing backslash needs two backslashes there to avoid ...
    (perl.beginners)
  • Re: Reading Text Files
    ... Did not your compiler generate some mandatory diagnostics on ... escape sequences invoking undefined behaviour. ... the OP is not using C99. ... because backslashes are escape characters in ISO C. ...
    (comp.lang.c)