I have a script that uses grep to extract data from a file. It works but I am now trying to modify the script for pipeline use. If I use the commands: cat file | myScript.sh
there is an error because the data reaches myScript.sh as it was collected by an echo command (grep: LINE: No such file or directory
).
Is there a way to pass 'file' as an argument to myScript.sh so that grep can work as it was originally meant?