Urgent, stupid, question

Urgent, stupid, question

Post by Simon Galt » Sun, 06 Nov 1994 06:19:50



Hello again - another dumb question:

I have a variable passing itself as an arguement to another script:

contents of variable   line  

1725 2385 2523

total=`./compute.vm $line`

when i look at $1 in ./compute.vm I get:

1725 2385 2523

what i WANT is
$1 to equal 1725
$2 to equal 2385
$3 to equal 2523

        Any advice?

                        Thanks in advance,
                                Simon

--
||| | || || Generic Sig                                         ''`
||| | || || ===========                                         O-O
||| | || ||                                                      L

|| 01416 || Information Technology Dept, Sheridan College, Oakville, ON, Canada

 
 
 

Urgent, stupid, question

Post by David W. Tamk » Mon, 07 Nov 1994 11:29:38




| I have a variable passing itself as an [argument] to another script:
|
| contents of variable   line  
|
| 1725 2385 2523
|
| total=`./compute.vm $line`
|
| when i look at $1 in ./compute.vm I get:
|
| 1725 2385 2523
|
| what i WANT is
| $1 to equal 1725
| $2 to equal 2385
| $3 to equal 2523

That's odd; in which shell?  total=`./compute.vm "$line"` should produce the
undersired effect you're getting, but what you're typing should give you what
you want.  [I'm assuming from variable= without the word "set" that you're
using sh or a shell with sh-style syntax and not one from the csh family.]

Back to the draing board: next try

  total=`eval ./compute.vm $line`

and see if that helps.

 
 
 

1. --stupid question but then there are no stupid questions--

        I'm a beginner here so, so far everything i read has gone
    way over my head. My problem is I got a script sent to me
    decoded or something like that. You are supposed to enter the
    data into a uudecode or something but I'm not sure how that's
    done. There's a program on the university's main menu that
    called UUDECODE but everytime I run it through it, it says it
    can't open the file. Comments ??????? Help ?

        eric

2. dhcp + alias with static address

3. Stupid or not so stupid questions

4. Calendar Manager Web interface ?

5. Stupid, stupid question

6. Cross-compiling DJGPP binaries on Linux

7. One stupid question and one not so stupid

8. *Free* booklet -- "The Network Security Game"

9. REALLY STUPID QUESTIONS (not so stupid)

10. Stupid, stupid, stupid...

11. Stupid, stupid, stupid! FAT access rights...

12. stupid choice = another stupid newbie question

13. STUPID STUPID question