0

We started using a new integration and production pipeline called GO. To execute a bash script there, the convenient way is to use the bash command instead of executing the script directly. For that the bash is called in a login shell, so the command I'm trying to execute the following:

bash -l run_tests `cat myserver.url`:8080
bash -l run_tests $(cat myserver.url):8080

But the whole cat myserver.url is passed as a string instead of being executed. Any ideas?

4

I wrote a little test script

$ cat run_tests 
echo "$@"
echo $0 Starting tests with $1
echo tests done

and ran following, (note quotes around -c "string")

$ bash -l -c "./run_tests $(cat furl):8080"
http://abc.com/:8080
./run_tests Starting tests with http://abc.com/:8080
tests done
  • 1
    Many thanks, it works like charm, only by convention you have to remove the -c since this param is assosiated with passing linux commands not files, I corrected my question. Many thanks!!!! – Moataz Elmasry Feb 26 '14 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.