1821840 Members
3396 Online
109638 Solutions
New Discussion юеВ

Re: wierd cat problem

 
SOLVED
Go to solution
John Henrikson
Regular Advisor

wierd cat problem

Hi,
this may be a really stupid question, but I'm stumped. I've got a couple scripts that have send me an email when a situation happens on my system, they all have the general form:

cat file1.txt| mailx "my email address"

all of a sudden when I run the script or even just issue the cat command I either get a null output on a file i know exists or the error message: No message !?!
Anyone know what is going on and how to fix it?
many thanks

John Henrikson
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: wierd cat problem

It appears that somehow your cat command has been clobbered or the cat command you are running isn't the one that you think you are running. Do a "type cat" and make sure that cat is /usr/bin/cat. If not, you have PATH problems. It is also possible that you have a bad alias for cat. Enter "alias" and see if there is an alias for cat. If these are okay then almost certainly you cat a bad cat command. There is a duplicate cat command under /bin. Try it.
If it ain't broke, I can fix that.
John Henrikson
Regular Advisor

Re: wierd cat problem

found a bad "cat" and removed it.. that did the trick.. many thanks for your help!