Next | Lightweight Databases | 8 |
Perl's -i option can make this easy:
perl -i -F: -lane 'print unless $F[0] eq "billg"' .users
-i opens the original file for reading
Then removes it
The reopens the same name for writing
Redirects standard output into the new file
Data written to STDOUT is captured in the file
Next | Copyright © 2003 M. J. Dominus |