You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
For usage messages and such in my shell scripts I typically use prog=${0##*/} instead of prog=$(basename $0).
dirname can similarly be replace with ${var%/*}.
You noted the ''#' and '%' string operations, but I though you may want to call out the opportunity to avoid firing off a process.
Excellent work. I'm sharing with the folks on my team newer to shell, as it is chock full of examples I have learned and taught myself back in the day when I had to write resource efficient scripts than ran on a bunch of Unixes and POSIX(ish) shells.
The text was updated successfully, but these errors were encountered:
For usage messages and such in my shell scripts I typically use
prog=${0##*/}
instead ofprog=$(basename $0)
.dirname
can similarly be replace with${var%/*}
.You noted the ''#' and '%' string operations, but I though you may want to call out the opportunity to avoid firing off a process.
Excellent work. I'm sharing with the folks on my team newer to shell, as it is chock full of examples I have learned and taught myself back in the day when I had to write resource efficient scripts than ran on a bunch of Unixes and POSIX(ish) shells.
The text was updated successfully, but these errors were encountered: