Skip to main content

All Questions

0 votes
1 answer
187 views

Bash/Zsh: Catching all commands that start with a `/`

Is there a way to get this example catchall function to be called whenever any command starts with the / character in an interactive shell (instead of searching in $PATH and executing something else, ...
Aaron Esau's user avatar
0 votes
3 answers
2k views

Script to use sudo in a terminal, gksudo otherwise?

I'd like to write a script that does an administration task, and I would like to be able to run it either from a terminal or not. If it runs in a terminal, even a graphical one, I'd like it to ask for ...
Ryan C. Thompson's user avatar