$ a=ok
$ b=a
$ echo ${!b-a}
ok
$ unset b
$ echo ${!b-a}
a
imho, the last command should expand to "ok" too
Mike Frysinger writes:
> On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote:
>> I would like to propose a new command for bash:
>>
>> ca [path]
>>
>> It returns the canonical path based on the current working directory and
>> entered path.
>>
>>
>> If the current working directory has be
Antonio Macchi writes:
> $ unset b
>
> $ echo ${!b-a}
> a
Indirection only looks at the PARAMETER part (here: b) of the
substitution. Since b is not set there nothing to indirect through.
Andreas.
--
Andreas Schwab, SuSE Labs, sch...@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 N
On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote:
> Mike Frysinger writes:
> > On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote:
> >> I would like to propose a new command for bash:
> >>
> >> ca [path]
> >>
> >> It returns the canonical path based on the current working direct
Mike Frysinger writes:
> On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote:
>> Mike Frysinger writes:
>> > On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote:
>> >> I would like to propose a new command for bash:
>> >>
>> >> ca [path]
>> >>
>> >> It returns the canonical path b
Mike Frysinger wrote:
On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote:
Mike Frysinger writes:
On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote:
I would like to propose a new command for bash:
ca [path]
It returns the canonical path based on the current work
Andreas Schwab wrote:Andreas Schwab wrote:
ca() { (cd "$@" && pwd -P); }
Andreas.
That works if I want the path to a directory, but it does not let me
operate on files within the directory.
I would also like to do this:
ro...@otto:~/test/B/BB$ ca ../b|xargs cat
hello
Rolf
Mike Frysinger wrote:
On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote:
Mike Frysinger writes:
On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote:
I would like to propose a new command for bash:
ca [path]
It returns the canonical path based on the current w
Andreas Schwab wrote:
ca() { (cd "$@" && pwd -P); }
Andreas.
That works if I want the path to a directory, but it does not let me
operate on files within the directory.
I would also like to do this:
ro...@otto:~/test/B/BB$ ca ../b|xargs cat
hello
Rolf
Mike Frysinger wrote:
On Thursday 12 February 2009 04:58:09 Andreas Schwab wrote:
Mike Frysinger writes:
On Wednesday 11 February 2009 23:38:10 Rolf Brudeseth wrote:
I would like to propose a new command for bash:
ca [path]
It returns the canonical path based on the current w
Andreas Schwab wrote:
ca() { (cd "$@" && pwd -P); }
Andreas.
That works if I want the path to a directory, but it does not let me
operate on files within the directory.
I would also like to do this:
ro...@otto:~/test/B/BB$ ca ../b|xargs cat
hello
Rolf
Hello! I'm writing a bash script that will run a set of commands contained in
a file. I'd like each of these commands to redirect their output to a
separate file specified along with the command. For some reason, when I run
the master script using nohup (there is a reason for doing this, although
Eric415 wrote:
> separate file specified along with the command. For some reason, when I run
> the master script using nohup [...] each of the commands redirects their
> output to nohup.out instead of the specified file. Any ideas?
The nohup command redirects output to the nohup.out file if the ou
14 matches
Mail list logo