[olug] firewall dump

Mark A. Martin mmartin at amath.washington.edu
Sat Sep 23 00:00:22 UTC 2000


Dear Gary,

You have to redirect the output from head to the new file, as Aaron
indicated.  You have to redirect the output because head sends it's
output to stdout.  Also, with funky control characters or unprintable
characters in your file, the number of lines in the file may not be
apparent.  I suggest using wc to count the lines first.  Then make sure
that you are not including the offending line in the new file.  The
corresponding commands would be

# This will give you the number of lines in the file, say 162
wc -l rc.firewall
# Copy the lines you want to keep to a new file.
head -161 rc.firewall > rc.firewall.new
mv rc.firewall rc.firewall.old  # Just as Aaron suggested
mv rc.firewall.new rc.firewall  # Just as Aaron suggested

You don't have to create rc.firewall.new first.  The redirection will
do that for you.

It might help to know what editor you are using to work with the file. 
Different editors handle funky characters differently.  It might also
help if you attach the last few lines of the file to a message to the
list so some of us can look at them.  Make a new file called, for
example, funky_lines.txt using the following command

tail -3 rc.firewall > funky_lines.txt

and attach the file to your next message to the list.

Mark
-- 
---------------------------------------------------------------------------
Mark A. Martin					Dept of Applied Mathematics
http://www.amath.washington.edu/~mmartin	University of Washington
---------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: olug-unsubscribe at bstc.net
For additional commands, e-mail: olug-help at bstc.net



More information about the OLUG mailing list