Hi Everyone, I am working on a bash script, and currently looking at examples. I came across something I'm not sure what it means: if (( $? )); , the double quotes and the $? is what I don't get. In the script there is no variable set for ? so kinda lost. Possible info: Simply enclose the particular arithmetic expression between a "$((" and a "))", and bash will evaluate the expression. And also anyone have recommendation of a good bash scripting book. Learning the bash Shell, 2nd Edition? Thanks, -- dj_goku -www.djgoku.com- -www.tektronic.org-
$? is the exit code of the previous command On Thu, 14 Oct 2004 15:00:17 -0500, djgoku <djgoku@gmail.com> wrote:
Hi Everyone,
I am working on a bash script, and currently looking at examples. I came across something I'm not sure what it means: if (( $? )); , the double quotes and the $? is what I don't get. In the script there is no variable set for ? so kinda lost.
Possible info: Simply enclose the particular arithmetic expression between a "$((" and a "))", and bash will evaluate the expression.
And also anyone have recommendation of a good bash scripting book.
Learning the bash Shell, 2nd Edition?
Thanks,
-- dj_goku -www.djgoku.com- -www.tektronic.org- _______________________________________________ Kclug mailing list Kclug@kclug.org http://kclug.org/mailman/listinfo/kclug
Why buy the cow when you can get the milk for free? http://jamesthornton.com/linux/abs-guide/ On Thu, 14 Oct 2004 15:00:17 -0500, djgoku <djgoku@gmail.com> wrote:
Hi Everyone,
I am working on a bash script, and currently looking at examples. I came across something I'm not sure what it means: if (( $? )); , the double quotes and the $? is what I don't get. In the script there is no variable set for ? so kinda lost.
Possible info: Simply enclose the particular arithmetic expression between a "$((" and a "))", and bash will evaluate the expression.
And also anyone have recommendation of a good bash scripting book.
Learning the bash Shell, 2nd Edition?
Thanks,
-- dj_goku -www.djgoku.com- -www.tektronic.org- _______________________________________________ Kclug mailing list Kclug@kclug.org http://kclug.org/mailman/listinfo/kclug
-- Got gmail? I do hahaha
Great site, thanks! I like Unix Shells By Example (covers C, Bourne, and Korn). Anyone have a gmail invite they can forward me? Thanks. crash 3m wrote:
Why buy the cow when you can get the milk for free?
http://jamesthornton.com/linux/abs-guide/
On Thu, 14 Oct 2004 15:00:17 -0500, djgoku <djgoku@gmail.com> wrote:
Hi Everyone,
I am working on a bash script, and currently looking at examples. I came across something I'm not sure what it means: if (( $? )); , the double quotes and the $? is what I don't get. In the script there is no variable set for ? so kinda lost.
Possible info: Simply enclose the particular arithmetic expression between a "$((" and a "))", and bash will evaluate the expression.
And also anyone have recommendation of a good bash scripting book.
Learning the bash Shell, 2nd Edition?
Thanks,
-- dj_goku -www.djgoku.com- -www.tektronic.org- _______________________________________________ Kclug mailing list Kclug@kclug.org http://kclug.org/mailman/listinfo/kclug
participants (4)
-
Ben Kelley -
crash 3m -
djgoku -
Paul Taylor