Find the answer to your Linux question:
Results 1 to 3 of 3
Hi. this line works when I run it from the commando line really good. But when I try to execute it in a shell script it brings up errors. /stash/Run.pl ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    scripting problem

    Hi.
    this line works when I run it from the commando line really good. But when I try to execute it in a shell script it brings up errors.

    /stash/Run.pl -db /stash/bench.db -dir ./gcc1 -benchmark gcc -sim /stash/ss3/sim-outorder - args "-fasfwd 100000 -max:inst 10000" >& ./logfile


    this command is all on one line. and the error is ./logfile : bad number

    My guess is that there is a syntax error. Are there special symbols i have to use when i run a command like this in a shell script.

    Thanks

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    The problem has to be more complicated than that. I created a file Run.pl, which is a Perl script which prints "Hello, world!\n". I created a shell script which consists of exactly this:
    Code:
    ./Run.pl -df /stash/bench.db -dir ./gcc1 -benchmark gcc -sim /stash/ss3/sim-outorder - args "-fastfwd 100000 -max:inst 10000" >& ./logfile
    I ran the shell script and got the expected "Hello, world!\n" in a new file called logfile.

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2
    solved the problem.

    just had one spelling error and pointed to the wrong interpreter location in my shell script.

    thanks for the help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...