Next | Unix Command Internals | 26 |
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 © 2003 M. J. Dominus |