10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have to kill the process "test" for a maintenance I do but want the script to check when it comes back up.
I can get what I want when I run this while loop:
while true;do ps -ef | grep test | grep -v grep | sed -e 's/^*//';sleep 60;done
but I want the script to do it for me and as soon as... (6 Replies)
Discussion started by: seekryts15
6 Replies
2. Shell Programming and Scripting
I am working on one script where I need to grep the exact process in perl script.
for e.g. when I run simple grep command on the linux machine it gives me two process mGateway_mvc_q01 and mGateway_mvc_q01_v7 which is not the correct result.I tried to use ( ps -eAf | grep ^mGateway_mvc_q01$) but... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies
3. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
4. Shell Programming and Scripting
Hi All,
below script reads the perticular files from the directory. Am trying to fetch status and print them in the required format.
It needs to read line and search for string "Passed/Failed" and print them under correct sub header.
script :
BASE_DIR=/tmp/test/REPORT/CollectReport
#... (16 Replies)
Discussion started by: Optimus81
16 Replies
5. Shell Programming and Scripting
Hi all!
Im working on a simple script in KSH (just started) to check if a process its up or down, but im kind of lost with the following error.
Script:
#!/usr/bin/ksh
psup=$(ps -ef | grep sftp | egrep -v grep | wc -l)
if ($psup > 0);
then
echo "Process SFTP running"
else
... (6 Replies)
Discussion started by: ARSport
6 Replies
6. Shell Programming and Scripting
Hi,
I would like to know how can i pipe the following output of grep into a predefined output format
This is the output of the grep command grep record *.txt | sort -r
2010-04-28-11-12-21.txt:C The user has created a record
2010-04-29-10-18-41.txt:U The user has updated a record... (8 Replies)
Discussion started by: alienated
8 Replies
7. Shell Programming and Scripting
Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know.
More detail.
ScriptA (bash), ScriptB (ksh), ScriptC (bash)
ScriptA, launches ScriptB
ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies
8. Shell Programming and Scripting
Hi,
Using AIX 5.3 and Ksh.
/>ls -al /usr/bin/ksh
-r-xr-xr-x 5 bin bin 237420 Apr 10 2007 /usr/bin/ksh
/>
I recently started working for a new employer. I have written UNIX K-Shell scripts for many years and have never had this particular issue before. Its perplexing me.
I have... (2 Replies)
Discussion started by: troym72
2 Replies
9. Shell Programming and Scripting
How can i write a script.?
which lists all X process and gets the start minute of each of them.
thanks (1 Reply)
Discussion started by: Anteus
1 Replies
10. Shell Programming and Scripting
How can I extract the 9th line of a text file.
thanks vm.:confused: (2 Replies)
Discussion started by: hoang
2 Replies