#!/bin/sh # 1. Lines which start with # are comments. # 2. The first line of the script should contain #!/bin/sh # 3. Don't forget to apply the command chmod 755 myscript # to your script otherwise you will get the error # "0403-006 Execute permission denied" when you try to run it. # 4. Run the script with ./myscript # 5. It is always good to specify what the script is for and who # has written it, so here we go: # myscript: example script for the exercise 1 of Språkstatistik HT97 # this script divides the Press65 corpus in a list of words # 971012 erik.tjong@ling.uu.se more /corpora/Press65/UnixAscii/p* | tr ' ' '\n' | more # note: if your command sequence gets longer than a line then you # may want to spread it over different lines. You can do this # by putting a backslash \ at the end of each line which # continues at the next line. There should not be any spaces # after the backslash. Example: # # more /corpora/Press65/UnixAscii/p* |\ # tr ' ' '\n' |\ # more