3 ms·
Thanks for the pointer about the useless use of true. Using builtins may be a security risk as they can be overloaded (hence the use of full paths everywhere).
by linschn 3y ago
Thanks for the pointer about the useless use of true.
Using builtins may be a security risk as they can be overloaded (hence the use of full paths everywhere).
I did not know about bash's extension of printf to print a date. I need to use the builtin to use it though. But I've received good advice elsewhere on how to do that securely, so I'll do it and do a write-up because it's not information that's easy to come by.
Your advice is very helpful, thank you.
- TristanBall 3y agoBash and zsh both allow: function /usr/bin/cat { echo hello; }; /usr/bin/cat hello So specifying a path isn't as useful as it seems
- pgtan 3y agofor builtin security see for example https://unix.stackexchange.com/questions/102746/how-to-invoke-a-shell-built-in-explicitly https://unix.stackexchange.com/questions/102746/how-to-invok...