mirror of
https://github.com/smxi/inxi.git
synced 2025-01-20 01:17:48 +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
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.4.4
|
#### version: 1.4.5
|
||||||
#### Date: February 14 2010
|
#### Date: February 16 2010
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -3248,18 +3248,18 @@ get_ps_data()
|
||||||
pid=$2
|
pid=$2
|
||||||
user=$1
|
user=$1
|
||||||
rss=sprintf( "%.2f", $6/1024 )
|
rss=sprintf( "%.2f", $6/1024 )
|
||||||
|
# have to get rid of [,],(,) eg: [lockd] which break the printout function compare in bash
|
||||||
|
gsub(/\[|\]\(\)/,"~", $0 )
|
||||||
if ( $12 ~ /^\// ){
|
if ( $12 ~ /^\// ){
|
||||||
appStarterPath=$11
|
appStarterPath=$11
|
||||||
appPath=$12
|
appPath=$12
|
||||||
appStarterName=gensub( /(\/.*\/)(.*)/, "\\2", "1", $11 )
|
|
||||||
appName=gensub( /(\/.*\/)(.*)/, "\\2", "1", $12 )
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
appStarterPath=$11
|
appStarterPath=$11
|
||||||
appPath=$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
|
print appName "," appPath "," appStarterName "," appStarterPath "," cpu "," mem "," pid "," rss "," user
|
||||||
}
|
}
|
||||||
' ) )
|
' ) )
|
||||||
|
|
Loading…
Reference in a new issue