Results 1 to 2 of 2
I have a bash script (Ubuntu 10.4) which has #!/bin/bash on the first line, enabling a function declaration and other similar features to be used.
I also use expect within ...
- 07-07-2011 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 10
Bash #! file headers
I have a bash script (Ubuntu 10.4) which has #!/bin/bash on the first line, enabling a function declaration and other similar features to be used.
I also use expect within the script. However the expect command is not recognised unless I replace the header line as above with #!/bib/bash/expect.
But if I replace it, of course, my function calls are no longer recognised.
How do I make my script work with BOTH the function declaration AND expect, while I can only have a single header line (as my friend google says I must have this declaration on the first line).
- 07-08-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,979
Assuming that expect is an executable found at /bib/bash/expect, then add /bib/bash to your path environment. You can do this inside the shell script if you wish.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote