Use parameter expansion instead of basename

This commit is contained in:
Ville Skyttä
2017-11-01 09:05:58 +02:00
parent f9a0dc44d3
commit 5fe30e7a26

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Use this script to test if a given TCP host/port are available # Use this script to test if a given TCP host/port are available
cmdname=$(basename $0) cmdname=${0##*/}
echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }