I've got a script, ex myscript.sh, and it has to redirect to stdout what it gets from stdin (like a cat).
For example:
myscript.sh < myfile.txt > myfile2.txt
How to do this?
Also, how can i redirect the stdout in another file rather then myfile2.txt?
My tries:
I tried using:
echo $*
And it only works using:
myscript.sh | cat myfile.txt
If i use:
myscript.sh < myfile.txt
it prints out nothing