Hi there!
I'm trying to write a script that will capture output from a command and assign it to a variable.
Let's say, for example, I'd like to catch from inside the script whatever the following command outputs:
ls *.aaa
and put it into a variable "listoffiles".
What I tried was:
set listoffiles = 'ls *.aaa'
echo $listoffiles
and what I got echoed was:
$ ls file1.aaa file2.aaa file3.aaa
instead of
$ file1.aaa file2.aaa file3.aaa
I played with this for a while trying various combinations and also looked into a few publications on scripting and couldn't find the solution. What am I doing wrong?