LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


LinkBack Search this Thread
Old 05-31-2012, 03:43 AM   #1
Registered: May 2007
Posts: 100

Rep: Reputation: 15

Hi ,

Have the following code
But have an issue trying to get it to interpret the the while loop
i.e print the total any ideas
fn "pmap" "bash" "-c 'while ((1));do `pmap @PID@ | grep total | ${t_awk} {'print $2'}`; sleep 1 ; done'" 

fn ()

Old 05-31-2012, 04:36 AM   #2
Senior Member
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,000

Rep: Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003
is this code works at all? what is the output?
Old 05-31-2012, 04:53 AM   #3
Registered: May 2007
Posts: 100

Original Poster
Rep: Reputation: 15
Yes this is the output for args:

args: -c 'while ((1));do mem=; sleep 1; done'

The issue is that it can interpret what's inside the while loop
"pmap" "bash" "-c 'while ((1));do mem=`pmap @PID@ | grep total | ${t_awk} {'print $2'}`; sleep 1; done'"


bash scripting, sed

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
pmap vs jmap grob115 Programming 1 06-20-2011 10:35 AM
pmap grob115 Linux - General 9 05-26-2011 06:37 PM
Pmap update fraFFfra Linux - Newbie 3 10-08-2010 04:46 AM
pmap -x available on all linux? amol28kulkarni Linux - Newbie 1 01-24-2009 01:44 AM
pmap for linux doraemona Linux - General 0 05-11-2002 04:43 AM

All times are GMT -5. The time now is 03:02 AM.

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