14.B: The cat Command | 14: File Utilities | 14: File Utilities |
You may remember the tail command which we used to view the last few lines of files. The head command is similar, except that it is used to view the first few lines of a file.
Go to the prog directory and try:
> cd development/prog/
> head area.f
Your response should look something like:
PROGRAM area c area of circle, r input from terminal DOUBLE PRECISION pi, r, A c Best value of pi for IEEE floating point pi = 3.14159265358979323846 c read r from standard input (terminal) PROGRAM area c area of circle, r input from terminal DOUBLE PRECISION pi, r, A
Like the use of tail, you have the option of specifing the number of lines you wish to see
> head -5 area.f
14.B: The cat Command | 14: File Utilities | 14: File Utilities |