forgot, was using awk, changed to gawk

This commit is contained in:
inxi-svn 2013-01-29 00:39:14 +00:00
parent 9515a5ab00
commit 2703defd0c

14
inxi
View file

@ -6670,8 +6670,8 @@ get_shell_data()
;; ;;
esac esac
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
script_parent=$( ps -fp $PPID --no-headers 2>/dev/null | awk '/'"$PPID"'/ { print $3 }' ) script_parent=$( ps -fp $PPID --no-headers 2>/dev/null | gawk '/'"$PPID"'/ { print $3 }' )
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' ) shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | gawk '/'"$script_parent"'/ { print $NF}' )
if [[ -n $shell_parent ]];then if [[ -n $shell_parent ]];then
shell_parent=" - parent $shell_parent" shell_parent=" - parent $shell_parent"
fi fi
@ -6690,13 +6690,13 @@ get_shell_parent()
eval $LOGFS eval $LOGFS
local shell_parent='' script_parent='' local shell_parent='' script_parent=''
script_parent=$( ps -fp $PPID --no-headers 2>/dev/null | awk '/'"$PPID"'/ { print $3 }' ) script_parent=$( ps -fp $PPID --no-headers 2>/dev/null | gawk '/'"$PPID"'/ { print $3 }' )
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' ) shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | gawk '/'"$script_parent"'/ { print $NF}' )
# no idea why have to do script_parent action twice in su case, but you do, oh well. # no idea why have to do script_parent action twice in su case, but you do, oh well.
if [[ $shell_parent == 'su' ]];then if [[ $shell_parent == 'su' ]];then
script_parent=$( ps -fp $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $3 }' ) script_parent=$( ps -fp $script_parent --no-headers 2>/dev/null | gawk '/'"$script_parent"'/ { print $3 }' )
script_parent=$( ps -fp $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $3 }' ) script_parent=$( ps -fp $script_parent --no-headers 2>/dev/null | gawk '/'"$script_parent"'/ { print $3 }' )
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' ) shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | gawk '/'"$script_parent"'/ { print $NF}' )
fi fi
echo $shell_parent echo $shell_parent