[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20051106: Shell scripts under FC 4 have trouble executing (cont.)



>From: Gilbert Sebenste <address@hidden>
>Organization: NIU
>Keywords: 200511060731.jA67VL7s020450 LDM pqact PIPE script

Hi Gilbert,

re: I don't think that your problem has anything to do with FC4

>Question: this has worked on Redhat 7, 8, and 9...not FC1. Why suddenly 
>does it not work?

I don't know.

>It apparently has been passing along the data all this 
>time with no problem. So you are saying that now, under FC4, the script 
>can't find those hidden files anymore? Wild!

I am saying that your script is looking to use a parameter passed
on the invocation command line, and you are not passing anything.
To me this is a potential problem area.  I will admit, however, that
you should be able to create a hidden file; grep through it; and
pipe its contents to another routine.

>So if I just use a "\1" after my argument, this should be sufficient, 
>because it will generate a lead name for the file (and thus make it 
>not hidden)?

I am suggesting that you try that, yes.

>Since I only need one argument for my script (there's no 
>"$2", or "$3"), I'll try the pqact with just a "\1"...that way, I won;t 
>have to rewrite my script. Correct?

The suggestion for what you may have wanted:

WMO     ^WUUS53 (KLOT|KDVN) ([0-3][0-9])([0-2][0-9])
        PIPE    -close -strip /home/ldm/warnscripts/tstormwarning \1\2\3

does not pass three arguments to the script. '\1\2\3' should be passed
as a single parameter, not three.

>Thanks Tom! I'll try it with a \1 first, and see what happens.

>From address@hidden  Sun Nov  6 11:55:49 2005

>I am onto something. I did what you said. This is what I get
>when I manually run the script:

>first passed parameter = ><
>process ID = 10581
>Berkeley DB version mismatch: compiled against 4.1.25, run-time linked 
>against 4.3.27

Interesting!  I do not get anything like this on my system.  It
seems to me that the first order of business is finding out what
executable out of all you are using is causing this error.

>What does the latter mean?

It pretty much indicates that something you are trying to use an
executable that is not happy.

Looking through your script:

#
PATH=/usr/local/bin:/bin:/usr/sbin:/etc:/usr/local/etc:/usr/bin:/bin
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib
UDRESPATH=/usr/local/etc
export PATH LD_LIBRARY_PATH UDRESPATH
dir=/tmp/
/bin/cat <&0 > ${dir}$1.$$
sleep 1
>>
if [ `/bin/grep -- "KLOT" ${dir}$1.$$ | /usr/bin/wc -l` -gt 0 ]
then
if [ `/bin/grep -- "197-" ${dir}$1.$$ | /usr/bin/wc -l` -gt 0 ]
then
if [ `/bin/grep -- "WILL COUNT" ${dir}$1.$$ | /usr/bin/wc -l` -gt 0 ]
then
/bin/cat ${dir}$1.$$ | /bin/mail -s "ALERT: SEVERE THUNDERSTORM WARNING--WILL 
COUNTY" will
fi
fi
fi

/bin/rm -f ${dir}$1.$$

What happens if you manually cat a file and pipe it to /bin/mail on
your system specifying the subject line and recipient 'will'?

Cheers,

Tom
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.

>From address@hidden  Sun Nov  6 14:54:22 2005

On Sun, 6 Nov 2005, Unidata Support wrote:

re:  It  seems to me that the first order of business is finding out what
executable out of all you are using is causing this error.

>Yep...

re: It pretty much indicates that something you are trying to use an
executable that is not happy.

>And I think I know what it might be...

re: What happens if you manually cat a file and pipe it to /bin/mail on
your system specifying the subject line and recipient 'will'?

>I tried it using user "whiteside", but I get the same error:

>Berkeley DB version mismatch: compiled against 4.1.25, run-time linked
>against 4.3.27

>OK. Since "mail", I think, is the only program that uses the DB
>program, it may be that. But running "mail" as a shell command and a
>'mail -s "Hi gilbert" sebenste' on a csh prompt also works fine.
>The Berkeley DB needs to be installed, not upgraded, as apparently the 
>links didn't get changed properly to match the new software. I have no 
>idea how to yum install it when I don't know what it is I need to 
>reinstall.

>From address@hidden  Sun Nov  6 15:35:04 2005

>I fixed it. And boy, do I feel stupid.

>When I was using Fedora Core 1, I installed Sendmail from a test 
>repository, using version 8.14.5. Wellllll...when I upgraded Fc1 to Fc4 it 
>said "this guy has a later Sendmail version than FC4, so I guess he wants 
>to keep it). The result, of course, is the libraries aren't current!

>So, I blew away Sendmail 8.14.5, instealled 8.13.3 for FC4 and voila! 
>Everything is working again.

>Thanks for your help in getting me to figure this out. And now I 
>know...when installing test packages, write them down, or they can haunt 
>you later!

>Take care and sorry for the run-around on this. (Blushing in 
>embarrassment...)

>Gilbert