1

I need to create a shell script that will execute node, perl, php, and python servers. How can I execute the various languages within bash?

1 Answer 1

3

You just run the appropriate interpreter.

#!/bin/bash

python script1.py
perl script2.pl
# etc
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the quick response. Will try it out.
Or add the appropriate shebangs to the python and perl scripts (e.g. #!/usr/bin/python), make them executable (chmod +x /path/to/script1.py), and then run them with either /path/to/script1.py or ./script1.py. Note that the ./ version only works if it's in the script's current working directory (which is not generally the same as the directory the script is in).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.