mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 17:07:49 +00:00
(change version)
small bug fix in -t, gawk has to strip out [,],(,) to avoid compare errors in bash for things like [nfsd] in output
This commit is contained in:
parent
dc4ed951b1
commit
3ea4eca9c1
12
inxi
12
inxi
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.4.4
|
||||
#### Date: February 14 2010
|
||||
#### version: 1.4.5
|
||||
#### Date: February 16 2010
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -3248,18 +3248,18 @@ get_ps_data()
|
|||
pid=$2
|
||||
user=$1
|
||||
rss=sprintf( "%.2f", $6/1024 )
|
||||
# have to get rid of [,],(,) eg: [lockd] which break the printout function compare in bash
|
||||
gsub(/\[|\]\(\)/,"~", $0 )
|
||||
if ( $12 ~ /^\// ){
|
||||
appStarterPath=$11
|
||||
appPath=$12
|
||||
appStarterName=gensub( /(\/.*\/)(.*)/, "\\2", "1", $11 )
|
||||
appName=gensub( /(\/.*\/)(.*)/, "\\2", "1", $12 )
|
||||
}
|
||||
else {
|
||||
appStarterPath=$11
|
||||
appPath=$11
|
||||
appStarterName=gensub( /(\/.*\/)(.*)/, "\\2", "1", $11 )
|
||||
appName=gensub( /(\/.*\/)(.*)/, "\\2", "1", $11 )
|
||||
}
|
||||
appStarterName=gensub( /(\/.*\/)(.*)/, "\\2", "1", appStarterPath )
|
||||
appName=gensub( /(\/.*\/)(.*)/, "\\2", "1", appPath )
|
||||
print appName "," appPath "," appStarterName "," appStarterPath "," cpu "," mem "," pid "," rss "," user
|
||||
}
|
||||
' ) )
|
||||
|
|
Loading…
Reference in a new issue