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: Using system and sed within awk
    ... You need to escape the ... but can't seem to get the quoting right: ... > I then escaped the double quotes with backslashes to preserve them: ... My code in this post is copyright 2005, Chris F.A. Johnson ...
    (comp.unix.shell)
  • 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)