last day (15 days later) » 

21:37
1
A: Bash Script does nothing

Zero Piraeustest is a bash builtin - called with no arguments, as in your example, it does nothing1. Your shell script is not called test but test.sh, so to run it you need to type: $ test.sh 1 Technically, it unsuccessfully does nothing (in other words, it returns a non-zero error code). If that means...

when i run test.sh i get command not found error.
I am going to try renaming my script
I renamed my file to foo.sh made a link and i am getting a 'command not found' error
@Babbleshack that probably means your ln -s ./test.sh /usr/bin failed ... do you see an entry for /usr/bin/test.sh if you type ls -l /usr/bin/te*?
@Babbleshack are you sure that you successfully made the link? What's in /usr/bin?
yer its there i ran ls | grep testme in /usr/bin and it shows the link
No ... use ls -l /usr/bin/te*. There's a reason I'm suggesting this.
lrwxrwxrwx 1 root root 11 Aug 17 22:33 /usr/bin/testme.sh -> ./testme.sh
its there i ran that command from home dir
hi thanks for your help by the way
21:38
Okay, now think about it. From the point of view of /usr/bin/testme.sh, what does ./testme.sh actually mean?
No problem :-)
well . mean current dir so it means look in current dir for testme
. is the current directory. The current directory for /usr/bin/testme.sh is /usr/bin.
i dont understand?
the script is found in my documents with a link to /usr/bin
What you actually needed to do was something like ln -s /home/babbleshack/testme.sh /usr/bin (depending where the file is) - relative links like ./something are relative to the place where the link is, not relative to where you were when you typed the ln command.
oooh i made the link using ln -s ./testme.sh /usr/bin
should i have instead put in the full path
21:42
Bingo :-)
haha thanks for that, an the time to think about the problem kudos for you
No problem ... and sorry for taking you the long way round, but I noticed when I was learning this stuff that if someone forced me to think about it, I remembered it better.
no i am glad, thats how i have been trying to learn things. i don't know how to give you merrit without putting the answer as correct.
I'll edit the answer a bit so it's clearer to future readers.
;p well thanks again ill accept it. despedida or eyar ill see ya later; depeding on which you prefer ^^
21:48
Either is fine :-) Thanks for the accept ...

last day (15 days later) »