The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
178 views

getopts - how to avoid read next $OPTARG as argument?

Just started use getopts and found one problem... For example - have a script with: while getopts "h:loav" opt; do case $opt in h) h=$OPTARG echo $h ;; But whet I run it: $ ./ftpclean.sh -h ...
2
votes
0answers
385 views

How to enable `sudo` with custom functions?

Recently I learned you can enable sudo for custom aliases as follows: alias sudo='sudo ' # note: the space is required! The reason this works is the following: If the last character of the ...