/bin/bash: Event not found.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting /bin/bash: Event not found.
# 1  
Old 04-30-2013
/bin/bash: Event not found.

Hi

I'm new to scripting - please help me...

I'm trying to run a script written by a friend:

Code:
#!/bin/bash

for aStat in ....

do
....
done

when coping the script to the terminal I get:


Code:
/bin/bash: Event not found.

for: Command not found.
do: Command not found.

I read the post recommending this:
Code:
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"

however still I got:
Code:
export: Command not found.

what am I doing wrong?

Thanks alot!

Last edited by Scrutinizer; 04-30-2013 at 03:12 PM.. Reason: code tags
# 2  
Old 04-30-2013
It could be bash's history expansion. It tries to expand the exclamation mark. Try switching it off first:
Code:
set +H

# 3  
Old 04-30-2013
thanks - didn't work

I got:

Code:
set: Variable name must begin with a letter.

Thanks for the fast response.

If relevant I'm working on Mac OS10.68
# 4  
Old 04-30-2013
Your terminal runs csh or tcsh.
Switch to bash with
Code:
exec bash

This User Gave Thanks to MadeInGermany For This Post:
# 5  
Old 04-30-2013
Just for a chance, can you try #! /bin/bash instead of #!/bin/bash ?

A space between "!" and "/"
# 6  
Old 04-30-2013
Quote:
when coping the script to the terminal
What do you mean? You don't "copy a script to a terminal". In case helpful, in case you are really "copying script to terminal": The script lives in a file. You set execute permission on the file, and run the file as a command.
# 7  
Old 04-30-2013
Pls post what shell you're using, and the entire scipt including the error messages, having confidential/proprietary/classified data scrambled.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed

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)
Discussion started by: i4ismail
3 Replies

2. Shell Programming and Scripting

Usage of #!/bin/sh vs #!/bin/bash shell scripts?

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)
Discussion started by: pstein
3 Replies

3. Open Source

/usr/bin/sh xlc not found

Hi Everyone, We are trying to compile Kerberos library using xlc and we get an error that xlc is not found in the system. We tried using gcc as well but it also fails with the same error. We could not find the compiler in the software media we received from IBM. Any inputs on how... (2 Replies)
Discussion started by: madhav.kunapa
2 Replies

4. Shell Programming and Scripting

/bin/sh: : not found error

Hello, When i run the shell script in Solaris, i am getting the below error. /bin/sh: Test.sh: not found I have tried including "#!/bin/bash" , did not work, tried with #!/bin/ksh , did not work, tried without the above include in the script, but still did not work. Please help me to... (5 Replies)
Discussion started by: balareddy
5 Replies

5. Linux

what caused no event found?

I tried to run nohup command line on my Linux server to connect to a remote server, then execute Oracle binary to run a process at background. My Linux information looks like this: oracle@myserver:/opt/oracle/scripts $ uname -a Linux myserver.domain.com 2.6.18-194.32.1.0.1.el5 #1 SMP Tue Jan 4... (1 Reply)
Discussion started by: duke0001
1 Replies

6. AIX

/usr/local/bin/cvs: Not found

I can able to access /usr/local/bin/cvs in the terminal (AIX 6.1 Box). but i am getting the "/usr/local/bin/cvs: Not found " when i call it from the script. please some one assist me what maybe problem (6 Replies)
Discussion started by: hifirockz
6 Replies

7. Debian

exec: 193: ./firefox-bin not found

Hi, all. When I run iceweasel as normal user in squeeze, I got forrowing message. exec: 193: ./firefox-bin: not found I think this is readlink problem, because ... #cat /usr/bin/iceweasel line 40........... MOZ_APP_LAUNCHER=$(which $0) MOZ_DIST_BIN= $(dirname $(readlink -f... (3 Replies)
Discussion started by: miru
3 Replies

8. Shell Programming and Scripting

#!/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... (2 Replies)
Discussion started by: danpaluska
2 Replies

9. Shell Programming and Scripting

/bin/ksh: scriptname: not found. ???

I have started to write Korn scripts on the client's AIX 4.2 servers and there is this small problem that puzzles me. I code all my scripts the same way: - first line contains : #!/bin/ksh - I do this console command on every scripts: chmod +x scriptname But still, on some occasions,... (4 Replies)
Discussion started by: Browser_ice
4 Replies

10. Shell Programming and Scripting

0: Event not found. in tcsh

Hello all I have this simple script that checking if file exist but when Im running it im getting error here is the script : #!/usr/bin/tcsh -fx set mod_test = "mod_test" if (-e $mod_hsf) then echo "File Here !!" else echo "File Not Here !!" endif And here is the error .. ... (1 Reply)
Discussion started by: umen
1 Replies
Login or Register to Ask a Question