I mean this code of yours works fine on my machine and does what is supposed to do:
echo "Check - ATP\n"
> OK > ERRORS
ps -eaf | awk -v ENV=$ENVIRONMENT '
# Read in atp file
NR==FNR { ref[$2]; next }
# Check for running processes
$0 ~ ENV && /ATP/ && ($12 in ref) {...
Another thing, you mentioned this "You need to do a for loop and check for each process individually, or else you can do it all in awk, something like this perhaps"
Individually do u mean something like :
ps -aef | grep $ENVIRONMENT | grep ATP | grep createaaa | wc -l | read x
if [ $x == 0 ]...
Hi Annihilannic,
I have tried to go through your code very well and copied and paste as it is, it only returned the ERROR messages and due to this $0 ~ ENV && /ATP/ && ($3 in atp) { running[$3] }
Based on my understanding, $3 is the last column from the system which it is process name that...
Hi Annihilannic,
I have tried to go through your code very well and copied and paste as it is, it only returned the ERROR messages and due to this $0 ~ ENV && /ATP/ && ($3 in atp) { running[$3] }
Based on my understanding, $3 is the last column from the system which it is process name that...
I have got an input file called atp having 2 columns like below:
createcase createaa
createcase createbb
createcase createcc
......
I would like to search in the system if there are running processes based on 2nd column such as $2.
So far this is what i wrote...
Hi,
I have got two .deb files on my machine(computer) and would like to install it on my virtual machine.
I know like if i have to install it on a vitual machine i have to issue a command # sudo dpkg -i package_file.deb
My problem is how do i specify the location of my package like the...
Hi khalidaaa,
Can you please check the Columb Healy code and test it how it should perform, I like yours because it is quiet simple but the problem is it doesnt work.
Can you please test your code and if it works paste it for me here.You also mentioned that i have to change the echo, im lost...
The code is working fine,but now i have got a big challenge.Do you know how to create a submenu in AIX?
I have created a menu script having 3 main options.It works well. But I would like to have a submenus within an option.
Eg. 1.Start - ATP
- BILLING
2.Check - ATP...
Hi,
I have created a menu script having 3 main option.It works well. But I would like to have a submenus within an option.
Eg. 1.Start - ATP
- BILLING
2.Check - ATP
- BILLING
3.Kill - ATP
- BILLING
Therefore the only code that i can only Start...
ok,let me try and see
but if i use echo "\033[31m\033[1m" Peter
It changes the text background of everything whereas i dont want that, I only want to make only Peter to be red.
e.g Peter is the man
Peter should be only in red
Ok, can you please me the place where i can get all this information.I mean on the site. Is there any other way where i can make a text flush or marquee like in html?
I have tried my level best to check on the internet/google on how to make some colors on the text / colouring text.
Eg How do I display text “Peter” in red or blue colour ? I mean echo “Peter” will just print “Peter”,but how do i make it blue
Thanks, it is working well well fine.Thank you so much and if it wasnt you i dont know, i've learnt a lot. Also i do agree with you that it also work with/without assigning the value to an array.
Thank you so much.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.