assinging variables in Bash from the command line
![](https://seccdn.libravatar.org/avatar/8b29c64096429656d603f22ed24fe149.jpg?s=120&d=mm&r=g)
Hi: If I want to do a pipe command and using semi-colons as well... how do I assign certain parts of my command to a variable?? Remember that I wont be building a bash script but working all from one command. Thanks alot!! Raul
![](https://seccdn.libravatar.org/avatar/4e2c3926757c18686414b6cf24e8fb8b.jpg?s=120&d=mm&r=g)
On Thursday 03 January 2002 15:39, Raúl Gutiérrez Segalés wrote:
If I want to do a pipe command and using semi-colons as well... how do I assign certain parts of my command to a variable?? something like:
var=$(command|command) ; echo $var | more | commands hth dan
![](https://seccdn.libravatar.org/avatar/df9db1dd16fd2b5995ef4a658de7b300.jpg?s=120&d=mm&r=g)
are you talkng about something like:
export JAVA_HOME=/usr/lib/jdk1.3
then you can:
cd $JAVA_HOME and you will be in that directory?
Hope this is what you are looking for.
01/03/02 08:39:18 AM, "Raúl Gutiérrez Segalés"
Hi:
If I want to do a pipe command and using semi-colons as well... how do I assign certain parts of my command to a variable??
Remember that I wont be building a bash script but working all from one command.
Thanks alot!!
Raul
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
participants (3)
-
Dan Am
-
James Bliss
-
Raúl Gutiérrez Segalés