Why script is running sometimes and not running sometimes?

Hi,

I have a script which does couple of database connection and run some SELECT queries to get some output in the file.

I am surprised to see :eek: that when i run my script some times it gives the desired out put and sometimes it shows some error :confused: .

Suppose if i execute it say 5 times 3 times it gives the output and 2 times not

Note: I don't do any change to the script. Just keep on executing it without any change

Can someone help on this??

i am working in KSH

Thanks

Posting details like script, output, environment and error messages will help us help you.

1 Like

If the script is doing something like generating an output in the working directory, it may generate different results each time you execute the script.

Just guessing because a few days ago it just happened to me and this kept me busy for a few minutes until I realised why the output was so different each time without doing any changes "apparently".

Above that, it could be a number of reasons why that's happening. It's difficult to guess if no details are given.

You've given us a puzzle a bit like:-

  • My car runs fine
  • Sometimes it doesn't

What's wrong?

You might need to give us a bit more information to have much chance of helping you here, such as the code (wrapped in & tags) along with some sample output and any error messages.

Give us a clue, please :confused: