OK lets analyze this command
Quote:
|
Originally Posted by pintu005
$echo "$(date '+%b %d %Y %H.%M') informat $pcpu $pmem"
|
The shell substitute all the variables
Assuming the variable $echo is not set it will translate to ''
next the date command $(....) will return a date 'Nov 02...' , etc,etc
Now the shell try and execute the line that start with Nov
i.e. trying to run the command Nov... that doesn't exist
Hence the error: not found
Remove the $ in front of echo (or replace with the more portable printf)
Quote:
|
Originally Posted by pintu005
$pcpu $pmem are not getting appended into the logfile
|
You did not include them in your 'printf....>>logfile' command. Change to
printf '%s\n' "$(date '+%b %d %Y %H.%M') $pcpu $pmem" >>logfile
You need to drop the initial $ in front of the commands that I previously posted (post #4). I copied and pasted from a terminal session where the $ is the command prompt. Sorry for the confusion.
PS. I did not test on AIX but it should work there.