Forums Register Login

What's wrong with it?

+Pie Number of slices to send: Send
hi,
i've created a simple script called "do" in linux and put it in /home/RnD/bin. i also set PATH to point to that directory e.i. PATH points to /home/RnD/bin. when i execute it like this,
[root@localhost me]# do
gives me the following error msg:
bash:syntax error near unexpected token 'do'
but if i run it by typing like this:
[root@localhost me] #/home/RnD/bin/do
it works. what's wrong with the previous one?
by the way, PATH is set in bash_profile file.
himal
+Pie Number of slices to send: Send
"do" is the name of the looping construct for the shell, and there are actually people so devious that they code such things in at the console.
Normally the current directory is not part of the path (unlike DOS/Windows), so the more correct command would be "./do" anyway. Assuming you had the "x" attribute set.
Hang a left on main. Then read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 667 times.
Similar Threads
Setting path in linux
I can't believe, I'm not able to get this servlet working!
confusion with output of java -version command
confuse on how to set the java_home classpath correctly
JMF problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:25:55.