Next | Unix Command Internals | 22 |
echo then writes I like pie.\n into the file, advancing the file pointer
Then it exits
The shell then runs the second echo, which writes Especially blackberry starting at position 12
What if the file pointer change hadn't survived the death of the first echo?
The second echo would have written at position 0
It would have overwritten the data left by the first echo!
Next | Copyright © 2002 M. J. Dominus |