mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
forgot, was using awk, changed to gawk
This commit is contained in:
parent
9515a5ab00
commit
2703defd0c
14
inxi
14
inxi
|
@ -6670,8 +6670,8 @@ get_shell_data()
|
|||
;;
|
||||
esac
|
||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||
script_parent=$( ps -fp $PPID --no-headers 2>/dev/null | awk '/'"$PPID"'/ { print $3 }' )
|
||||
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' )
|
||||
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 | gawk '/'"$script_parent"'/ { print $NF}' )
|
||||
if [[ -n $shell_parent ]];then
|
||||
shell_parent=" - parent $shell_parent"
|
||||
fi
|
||||
|
@ -6690,13 +6690,13 @@ get_shell_parent()
|
|||
eval $LOGFS
|
||||
local shell_parent='' script_parent=''
|
||||
|
||||
script_parent=$( ps -fp $PPID --no-headers 2>/dev/null | awk '/'"$PPID"'/ { print $3 }' )
|
||||
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' )
|
||||
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 | gawk '/'"$script_parent"'/ { print $NF}' )
|
||||
# no idea why have to do script_parent action twice in su case, but you do, oh well.
|
||||
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 | awk '/'"$script_parent"'/ { print $3 }' )
|
||||
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | awk '/'"$script_parent"'/ { print $NF}' )
|
||||
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 | gawk '/'"$script_parent"'/ { print $3 }' )
|
||||
shell_parent=$( ps -p $script_parent --no-headers 2>/dev/null | gawk '/'"$script_parent"'/ { print $NF}' )
|
||||
fi
|
||||
echo $shell_parent
|
||||
|
||||
|
|
Loading…
Reference in a new issue