Search Results

Search: Posts Made By: GregWold
29,833
Posted By GregWold
spirtle, I have the backticks because that's...
spirtle,

I have the backticks because that's the example I found. I'm still a noob and don't know any better. Anyway, thanks for the suggestion! Here's the final code:

BODY=`cat <<EOF...
29,833
Posted By GregWold
Using Variable As Input For mailx
All,

I'm having difficulty using a variable as the body of an e-mail; I suspect it has to do w/quoting, but am not sure. Right now I have separate functions for sending information and for sending...
5,223
Posted By GregWold
Comparing CRON PID w/Current PPID
All,

I've got a script that needs to check if it was started by cron. The code seems to be right, but it's not running correctly if cron starts it. Am I getting the pid's correctly? I'm not having...
4,305
Posted By GregWold
RE: while do loop
Thanks for the example. My question was because I wasn't sure if the variable UL_PROCESS would be set/reset every time.

What I'm doing is creating a script that can be run via cron or command...
4,305
Posted By GregWold
Program Flow/Logic Question
Sorry, I'm new to this and am surprised I've made it this far.

Can I do a

UL_PROCESS=$(ps -eaf | grep $PROGRAM | grep -v grep | wc -l)

while [ $UL_PROCESS -ne 0 ]
do
...
done

or...
4,305
Posted By GregWold
RE: Else Loop Exiting Early
Joey,

1) Correct. I want it to run until 8675309 starts. Then on the next check it should go to else.

2) Should I change it to
if [ $UL_FILE_TYPE = TEMP -a $UL_PROCESS -eq 0 ]
That is...
4,305
Posted By GregWold
RE: Else Loop Exiting Early
Sure (I didn't realize 1) that you could use the code tag and 2) that when posting, it would remove my formatting. Sorry!


check_ul_process()
{
PROGRAM=8675309
LONG_SLEEP=5
...
4,305
Posted By GregWold
Else Loop Exiting Early
All,

I'm having a problem w/this function. Specifically, I want to call another function (get_stats) when the process in the else completes (the initial if and the elsif seem to work fine). But...
70,801
Posted By GregWold
RE: cat /dev/null
You could also do

> /var/tmp/mond.log

That is, greater than + space + filepath
4,595
Posted By GregWold
RE: Using mailx In A Function
:o

Never mind. I figured it out. When I was testing, I guess I put the back ticks "`" in the wrong place. They should be at the beginning of the mailx line and after the EOF line.
4,595
Posted By GregWold
Using mailx In A Function
All,

I have a ksh script running on HP-UX (B.11.23 U ia64) that calls mailx and works the way I want. But I am modifying my script so that it uses functions instead of processing in-line. When I...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 02:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy