LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2006, 04:17 PM   #1
manicman
Member
 
Registered: Oct 2005
Location: England (Southampton)
Distribution: Ubuntu 6.06 , Gentoo
Posts: 62

Rep: Reputation: 15
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
Code:
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
Code:
app=`ps -A`
awk '/fbpanel/ { print $0 }'  $app
but that doesnt work any ideas how this should be done ?
 
Old 01-21-2006, 04:40 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Looks like you want a pipe:

Code:
ps -A | awk '/fbpanel/ { print $0 }'
 
Old 01-21-2006, 04:48 PM   #3
manicman
Member
 
Registered: Oct 2005
Location: England (Southampton)
Distribution: Ubuntu 6.06 , Gentoo
Posts: 62

Original Poster
Rep: Reputation: 15
thanks for that it worked perfectley
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash/ksh variables question tpe Programming 2 08-11-2005 10:39 AM
Question about variables setianusa Programming 3 05-05-2005 07:38 PM
BASH variables evaluation question. Thetargos Programming 11 08-11-2003 05:11 AM
Question about php variables lostboy Programming 5 08-07-2003 08:38 PM
sysctl variables, a question dunkyb Linux - Networking 0 02-12-2003 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration