Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

amanszab

macrumors newbie
Original poster
Dec 6, 2007
1
0
My issue is that my computer is not recognizing bash terminal scripts. I type in the name of the script, hit return, and nothing happens. No errors arise. Any suggestions?
 

ChrisA

macrumors G5
Jan 5, 2006
12,914
2,164
Redondo Beach, California
My issue is that my computer is not recognizing bash terminal scripts. I type in the name of the script, hit return, and nothing happens. No errors arise. Any suggestions?

How do you know it is not working? Silly question but it is hard to know what is wrong when all you say it "it don't work". Could you try making a small two line script, post the script here and tell us what happens. The more information you can give the better. But do keep your example script down to as small as possible.
 

KidneyPi

macrumors member
Dec 6, 2007
37
0
Is the script you want to run in your path? If so, unless you are in the same directory as the script, you do have a problem. If you are in the same directory as the script, put a ./ at the front of the filename. You could also type the complete path to the script.

To see your path, type: echo $PATH
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
Is the script you want to run in your path? If so, unless you are in the same directory as the script, you do have a problem. If you are in the same directory as the script, put a ./ at the front of the filename. You could also type the complete path to the script.

To see your path, type: echo $PATH

If the script wasn't in the path, bash would return an error. The OP didn't see any error message.

The script is executing, it's just not doing what the OP wants it to do.
 

CaptainZap

macrumors regular
Jan 17, 2007
170
0
Permissions possibly? I'm not sure what a script does if the permissions aren't set right.
 

KidneyPi

macrumors member
Dec 6, 2007
37
0
If the script wasn't in the path, bash would return an error. The OP didn't see any error message.

The script is executing, it's just not doing what the OP wants it to do.

Good point. Is this a script that came with the system? Did the OP write it? Maybe the OP could post the script or a link to it.

Many new *nix users get tripped up by the fact that many programs don't put output on STDOUT (the terminal display). Unless the script is meant to pass output to another program or to be written to a file, there is often no output.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.