mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
scripts/iiab-diagnostics: 'which' command deprecated by Ubuntu 22.04
This commit is contained in:
parent
e6f5d5778c
commit
69ac0c1fad
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ function cat_cmd() { # $1 = command + params, $2 = explan
|
||||||
echo " $1 # $2"
|
echo " $1 # $2"
|
||||||
echo "=IIAB==========================================================================" >> $outfile
|
echo "=IIAB==========================================================================" >> $outfile
|
||||||
cmd=$(echo "$1" | sed 's/\s.*$//') # Keep command on left; Drop params on right
|
cmd=$(echo "$1" | sed 's/\s.*$//') # Keep command on left; Drop params on right
|
||||||
pth=$(which $cmd | sed 's/[^/]*$//') # Keep only path on left; Drop command on right
|
pth=$(command -v $cmd | sed 's/[^/]*$//') # Keep only path on left; Drop command on right
|
||||||
if [ "$2" = "" ]; then
|
if [ "$2" = "" ]; then
|
||||||
echo "COMMAND: $pth$1" >> $outfile
|
echo "COMMAND: $pth$1" >> $outfile
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue