You could run it from the command line as you say, or from a script.
You can program "in the terminal" exactly as you would in a script.
If your shell is /bin/ksh, for example (echo $0 to see what shell you are running), you can type ksh commands on the command line exactly as you would write them in a script.
So whether you run
Code:
(echo $PWD/file1; cat file1) | cksum
from the command line, or put it into a file and execute the file, the result is the same.
If you're very new to this you might want to avoid
Perl just for now!