LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 03: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, 03:40 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

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

Code:
ps -A | awk '/fbpanel/ { print $0 }'
 
Old 01-21-2006, 03: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



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 09:39 AM
Question about variables setianusa Programming 3 05-05-2005 06:38 PM
BASH variables evaluation question. Thetargos Programming 11 08-11-2003 04:11 AM
Question about php variables lostboy Programming 5 08-07-2003 07:38 PM
sysctl variables, a question dunkyb Linux - Networking 0 02-12-2003 01:07 PM

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

All times are GMT -5. The time now is 06:19 PM.

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
Open Source Consulting | Domain Registration