Afficher un message
Vieux 25/03/2008, 21h15   #2
worldcyclist@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Accessing params called by a shell script

Hello everyone!
I am using a bash shell script that accepts command line parms.
For example call it "cars.sh" and it accepts a car name through $1
Later in the script I need to have this script to call another script
to return
multiple parms. In fact it's a perl script (used for it's hashing
abilities) that if you were to call it would give you this....

../return_car_values.pl Jeep
Wrangler Green 1995

The question is, how would I then parse "Wrangler", "Green" and "1995"
into arguments by the calling program..

Example program is below...
-------------------------------------------------------
#!/bin/bash
CARS=$1
....
....
`./return_car_values.pl $1`
------------------------------------------------------

I guess my question is how do I accomplish this....
($MODEL, $COLOR, $YEAR) = `./return_car_values $1`

Many thanks!
JC


  Réponse avec citation
 
Page generated in 0,04364 seconds with 9 queries