A
Andreas Berg
Greetings,
With this, I will get what I want into <STDIN> and I can read it. But,
this is the only case I want to read it. I do not want my script to try
to read from a file in case I do have any command line paramters and I
do not want the script to wait for keyboard input. If something is piped
to the script, I want that data, if nothing is piped to the script, I
dont want it to do anything with <STDIN>, how do I accomplish this ?
regards,
Andreas
I'm writing a script that is supposed to fetch information from said:cat file.txt | myscript.pl
With this, I will get what I want into <STDIN> and I can read it. But,
this is the only case I want to read it. I do not want my script to try
to read from a file in case I do have any command line paramters and I
do not want the script to wait for keyboard input. If something is piped
to the script, I want that data, if nothing is piped to the script, I
dont want it to do anything with <STDIN>, how do I accomplish this ?
regards,
Andreas