
September 13th, 2006, 08:58 PM
|
|
Contributing User
|
|
Join Date: Dec 2005
Location: The grassy knoll
|
|
Quote: | Originally Posted by jaffy I need to ensure that when a certain executable is used particular flag are passed to it, including any flags the user tries.
So I was thinking of using a shellscript of the same name as the executable which calls the real executable plus all flags.
I do not wish to use an alias for this task for a million reasons, so does anyone have a better idea than my hacky solution?
thanks |
In Bash you use the command builtin to run a command wrapped in a script of the same name. e.g., script name ls is
Code:
#!/bin/bash
command ls -optiions
Another option is exec
Code:
#!/bin/bash
exec /bin/ls -options #Use the full path name.
|