I need to override the first argument when I call a binary.
Since it's the program name I have two solutions:
- move the binary and call it with its new name; or
- create an alias (if the shell allows it).
However, sometimes I need to completly remove the first parameter.
I wrote a simple program in C that does the job:
#include <unistd.h>
int main(int argc, char **argv)
{
return execve(argv[1], NULL, NULL);
}
I there a built-in way to do it with the shell? A solution for bash would be prefered.