#!/bin/bash and #1bin/sh command not found error on mac osx terminal/shell script
i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine.
then last week i wrote capture.sh and it has been running fine on a couple computers.
but then i tried to run videochecker.sh on a new machine that runs capture.sh fine and i got the following error:
why will one script(capture.sh) execute fine and the other (videochecker.sh) gives this weird bash error?
but then i saw they had different first lines.
one is /bin/sh and one is /bin/bash
weird thing to because the one that doesn't work on this machine (/bin/bash) has been working fine on the other broadcaster mac min for several weeks. scripts still very mysterious to me.
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed ? Is there any way to get the script names for the process command ?
--- Post updated at 08:39 AM ---
in KSH (Korn Shell), my command output shows the script names but when run in the Bash Shell... (3 Replies)
Hi guys and gals...
After much searching on the good ol' internet I could find nothing, so this is the result.
ALthough many people seem to have asked this question no-one seems to have a solution so here we go.
I need for AudioScope.sh, 'xterm' to run a second program for some of its... (2 Replies)
Some question about the usage of shell scripts:
1.) Are the commands of the base shell scripts a subset of bash commands?
2.) Assume I got a long, long script WITHOUT the first line.
How can I find out if the script was originally designed für "sh" or "bash"?
3.) How can I check a given... (3 Replies)
Hi
I'm new to scripting - please help me...
I'm trying to run a script written by a friend:
#!/bin/bash
for aStat in ....
do
....
done
when coping the script to the terminal I get:
/bin/bash: Event not found.
for: Command not found. (7 Replies)
Hello,
I am new to Mac OSX and shell scripting all together. I was wondering if anyone could help get me started in a few scenarios so that I would be able to automate checking a system against a STIG checklist. A STIG Checklist is a DoD Guideline for securing systems. Here is the first... (3 Replies)
Hi All,
Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux
Issue:
While executing shell scripts in bash shell, following error messages are thrown:
rm:command not found
On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
I have a file named Me_thread_spell.txt that I want to split into smaller files. I want it to be split in each place there is a ;;;. For example,
blah blah blah ;;;
blah bhlah hlabl
awasnceuir
asenduhfoijhacseiodnbfxasd;;;
oabwcuhaweoir;;;
This full file would be three separate files... (7 Replies)
Hello,
On Mac OSX, I was wondering about my Cron Script:
HELL=/bin/tcsh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HOME=/var/log
MAILTO=jwillis
25 1 * * * root /Users/jwillis/Fbcmd\Scripts/DailyBirthday.scrmy returned message is:
Subject: Cron... (3 Replies)
I am trying to create a shell that asks the user to enter their name, and compare it to my own by saying we have the same name or saying my name and that they have a nice name too. Here is my script...
#!/bin/bash-x
echo "Enter your name".
read name
if
then
echo "My name is Adam too"... (1 Reply)
#!/bin/ksh
echo -en "\033|||'-'))
echo -e "\033
The above script works fine when the interpreter is ksh, but outputs the following error when #!/bin/bash is used as shebang:
test.sh: line 5: syntax error near unexpected token `('
test.sh: line 5: `case "$ACTIVATION_KEY" in +(|||'-'))' (2 Replies)