View Single Post
Old Nov 18th, 2006, 4:02 AM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by Eric the Red View Post
Yes, I've been told to write the 'bash' command then create my script in that shell.
If I understand you correctly, you shouldn't need to do that.

For instance, I could be running dash, and create a shell script that will run using bash:
dash$ cat > shellscript.sh
#!/bin/bash
echo Running using $SHELL

dash$ chmod +x shellscript.sh
dash$ ./shellscript.sh
Running using /bin/bash
Of course, it could be that your teacher wants you to switch to a standard shell before doing anything, so you don't run into any strange commands. However, the shell script itself is just a text file, and can be created using any program or shell with the capability to write text to files.
Arevos is offline   Reply With Quote