-   Linux - Newbie (
-   -   variables question (

manicman 01-21-2006 04:17 PM

variables question
hi just a question about variables in scripts im trying to run this command with out using temporary files but im not sure how to do it

ps -A > ~/.temp
awk '/fbpanel/ { print $0 }'  ~/.temp

that searches for every application running called fbpanel is there a way a can alter it so that it doesn't write to the hardrive ? ive tried this

app=`ps -A`
awk '/fbpanel/ { print $0 }'  $app

but that doesnt work any ideas how this should be done ?

btmiller 01-21-2006 04:40 PM

Looks like you want a pipe:


ps -A | awk '/fbpanel/ { print $0 }'

manicman 01-21-2006 04:48 PM

thanks for that it worked perfectley :)

All times are GMT -5. The time now is 05:08 PM.