using standard input in shell script

view full story

http://stackoverflow.com – I always run my shell with a command: ./shellName file1 file2 So, in the shell, I can refer file1 as $1 and file2 as $2. However, if I want to run the shell with this command ./shellName < file1 > file2 I tried to read the file1 as standard input and file 2 as standard output. How can I refer file1 and file2 in the shell script? Can I still use $1 and $2? Thanks in advance. (HowTos)