Menu

#554 Set and Backticks

general
open
nobody
5
2018-06-02
2017-11-27
No

It's not possible to run a script within backticks in the AROS Shell. For example if I have a script called HelloWorld which just contains the line:
Echo "Hello world!"
Then try and capture the output from it with:
Set TEST HelloWorld

It only looks like the script is being run but nothing get's set in the $TEST environment variable.

I made an image to illustrate the problem.

1 Attachments

Discussion

  • David Eriksson

    David Eriksson - 2017-11-27

    My backticks got eaten by the formatting, so the picture better shows what I mean

     
  • Crosswinds

    Crosswinds - 2018-06-02

    As far as I can tell, it really does execute the script; try using a script that itself sets a variable, then after the script ends, check the variable.

    However, according to the report the output isn't going where it is expected to go. Is the output indeed not going where it should, or is the problem in the expectation?
    If I backtick Execute scriptname, the output will end up in the shell; if I just backtick scriptname it won't. In neither case providing it as argument to Set appears to actually set it. This is different from C: commands, that do provide the output when backticked. (CD, Dir, List)

     

Log in to post a comment.

MongoDB Logo MongoDB