On Fri, Sep 29, 2006 at 08:02:38AM -0500, Hugo Vanwoerkom wrote:
> Kevin Mark wrote:
> >On Wed, Sep 27, 2006 at 09:22:05PM -0500, Ron Johnson wrote:
> >>how about
> >> b=`$a`
> >> echo $b
> >
> >or
> >echo $($a)
>
>
> Bingo!!! Thanks!
> Is that in the Advanced Bash-Scripting Guide?
> H
>
Hi H
Hugo Vanwoerkom wrote:
Hi,
On my way to elapsed time in a bash script, I created the do_chrono
command. It pumps the elapsed time to stdout.
So if I do:
a=do_chrono
and then:
$a
I get: 0:3:19.
Problem: I can't use that $a anywhere, e.g. if I say:
echo $a
I would expect to see 0:3:19 ag
Kevin Mark wrote:
On Wed, Sep 27, 2006 at 09:22:05PM -0500, Ron Johnson wrote:
how about
b=`$a`
echo $b
or
echo $($a)
Bingo!!! Thanks!
Is that in the Advanced Bash-Scripting Guide?
H
echo `$a`
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Troub
Atle Veka wrote:
In your example you are saying that $a is the function 'do_chrono', so
when you run $a, it runs the function and prints out the result. As
another poster indicated, you need to do it slightly differently:
# execute and store result in $a
a=$( do_chrono )
# print
echo $a
Yup
Ron Johnson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/27/06 18:51, Hugo Vanwoerkom wrote:
Hi,
On my way to elapsed time in a bash script, I created the do_chrono
command. It pumps the elapsed time to stdout.
So if I do:
a=do_chrono
and then:
$a
I get: 0:3:19.
Problem: I
On Wed, Sep 27, 2006 at 09:22:05PM -0500, Ron Johnson wrote:
>
> how about
> b=`$a`
> echo $b
or
echo $($a)
echo `$a`
--
| .''`. == Debian GNU/Linux == | my web site: |
| : :' : The Universal | debian.home.pipeline.com |
| `. `' Operating System| go to coun
In your example you are saying that $a is the function 'do_chrono', so
when you run $a, it runs the function and prints out the result. As
another poster indicated, you need to do it slightly differently:
# execute and store result in $a
a=$( do_chrono )
# print
echo $a
Atle
-
Flying Crocodile
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/27/06 18:51, Hugo Vanwoerkom wrote:
> Hi,
>
> On my way to elapsed time in a bash script, I created the do_chrono
> command. It pumps the elapsed time to stdout.
>
> So if I do:
>
> a=do_chrono
>
> and then:
>
> $a
>
> I get: 0:3:19.
>
> P
8 matches
Mail list logo