On Wed, 23 Oct 2002, christopher j bottaro wrote: > first off, are there any mailing lists where i can ask questions about > bash scripting?
I spend a lot of time on the Moongroup shell.scripting list at: http://moongroup.com/mailman/listinfo/shell.scripting > anyways, i want to assign the exit status of a command in a variable as an > integer. i tried the following: > let x=`./configure --prefix=$1` > but it doesn't work. You can't do that. Bash has a builtin variable ("$?") for holding the exit status, which you can then reassign to another variable if you need to store it for later use. For example: x=$? or you can just test the exit status directly with conditional expressions such as: ./configure && make && make install make uninstall || echo "Help me, I've failed and I can't get up!" -- "The only thing that helps me maintain my slender grip on reality is the friendship I share with my collection of singing potatoes." - Holly, JMC Vessel *Red Dwarf* -- redhat-list mailing list unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list