I need help with loading software that has a built-in platform_check script. My plan is to create a script titled uname which when executed will print an accepted platform. The script works as I need it to but I can't figure out how to get the uname command to search for my custom uname script instead of the /bin/uname default. I have tried using PATH something like PATH=~/.../path_to_uname:$PATH this does not work. I do not have root access so I cant just edit/create uname in its default location.
when I execute the script like so: exec /directory_to_uname/uname and /directory_to_uname/uname -r both work as I intend them I just need to trick the shell to look for my custom uname.
You can try to use alias to
trick
the shell. For example (using bash) edit ~/.bashrc and addalias uname='path/to/uname uname'
. executesource ~/.bashrc
and the command uname will get the one from alias. If you change it foralias uname='ls -lha'
and load (source command) when executinguname
it will list the files/dir.