Question : shell script passing arguments

I wrote the shell script something like this

while read myline
do
dir=`awk -F: ' /File generated in/{print $2}' $myline`
print "DIR: $2\n"
done < data.out

parsing the file for a pattern File generated in

I have to pass some arguments to the same script which I use later in the script something like this
version=$1
for client in $*
do
echo $client
update.sh "$client"
done


$2 is the first bit is picking up the client array being passed as arg to the script.
How can fix this problem?

Answer : shell script passing arguments

Still not 100% clear to me.

For your first requirement, you can do

for dir in `awk -F: ' /File generated in/ {print $2}' data.out`
do
  cd $dir
done

For the second requirement, you can do

version=$1
shift
for client in $8
do
  echo $client
  update.sh $client
done
Random Solutions  
 
programming4us programming4us