D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Command-line: jump to arbitrary parent dir from deeply nested dir (bash)

 

On Tue, 3 Sep 2013, wes wrote:

On Tue, 3 Sep 2013, Gordon Henderson wrote:
On Tue, 3 Sep 2013, Philip Hudson wrote:
On 3 Sep, 2013, at 12:19 pm, Gordon Henderson wrote:

Curiously enough it doesn't work for me.

gordon @ yakko: alias up 'cd `pwd | sed \'s|\(.*/\!:1/\).*|\1|\'`'
Unmatched `.

Interesting. Let's see, possible root causes.

my guess would be that the backslash_quote shell variable isn't set:

brwtys:~ [19] set |grep backslash_quote
brwtys:~ [20] alias up 'cd `pwd | sed \'s|\(.*/\!:1/\).*|\1|\'`'
Unmatched `.
brwtys:~ [21] set backslash_quote

Yup. That was it. Quoting... The universal shell 'gotcha' ..

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq