--- On Wed, 31/12/08, Ashish Verma <ashishverma1...@gmail.com> wrote:

> 
> I am completely new to this field. I only have some
> knowledge of C and other
> basic languages like HTML and javascript. I am trying to
> write an
> interactive/automated script to start the VMs on my
> machine.
> 
> So a part of that is to list all the iso's in my system
> and let the user
> select which one to use in the VM. I have done the
> following:
> 
Your specs are very clear to me, please post full code.

> list_iso()
> {
> varX=CD
> varY=0
> locate *.iso > /temp/cdromlist
> cat /tmp/cdromlist | while read count; do
> varY=$(expr $varX + 1)
> echo "$varX$varY is $count" # this displays as
> CD1 is /vms/rhel4.iso
> #Assign the value of the path to unique variable
> varZ="$varX$varY # This makes varZ equal to CD1
> $varZ=$count  # Now this should make a variable CD1 hold
Both both sides of equality you have $. Left should not have.

> the value
> /vms/rhel4.iso just like the path variable but I get error
> for  this
> indicating "No such file or directory".
> 
> ...........
> }
where the loop while ending? please post full code.

Best way to debug is to run with  -x option.

If it is only bash, you can use array also.

Raman.P


      Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

_______________________________________________
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to