You are not logged in.
I made a prepend path for executing in the system.
When I add scipts with commands:
sudo mount
ls
with a ' $@ '
it makes loop when called and starting new bash commandline.
I guess system is forced to use my scripts and can not use original mount
when used as alias there is no $@
when used as script the $@ is needed
What makes the problem ?
it makes mount command to loop and execute many times.
Last edited by akumixx (2012-01-03 21:37:34)
Offline
I have trouble understanding what you mean. Can you post the output of 'which mount'?
Aliases don't take arguments (like $1 or $@).
Offline
/bin/mount
What I did was
add path to my directory
and there is mount file as executable
there is inside
sudo mount $@
and thats the problem.....
I just realized...
I call mount command -- it calls mount command also. which also and also and also........
BECAUSE MY SCRIPT NAME AND SYSTEM COMMAND ARE THE SAME.
I agree to delete this thread....
Offline
You could have your script called "mount" in some location other than /bin/, such as ~/bin/mount. Inside ~/bin/mount instead of calling just "mount" call "/bin/mount" and it will unambiguously refer to the system command rather than your script. eg
#!/bin/bash
# this is an executable script called 'mount' in my ~/bin/ which has been added to my PATH variable
/bin/mount $@"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
thanks thats what I was looking for, after your post, this thread is fully solved.
Offline
Offline
I did not find the diference about "$@" in my example
--
You did not specify any switch or I dont know what you say or command mount is a magic thing that Ive never heard of.
Offline