Sort a list of IP addresses naturally by octet number:
# sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n
Sorting IP addresses using sort
- April 5th, 2008
- Posted in Technical Blog
- No Comments
Sort a list of IP addresses naturally by octet number:
# sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n
The following line of config, when added to Muttrc, will ensure that all Maildir directories in ~/Maildir are available to browse via the Mutt userinterface (using “c” or TAB):
mailboxes echo -n "+ "; ls -ad ~/Maildir/.* | sed -e "s/^.*Maildir\/\([^\/]*\).*$/+\1/" -e "s/ /\\\\\\\ /g" | xargs
NPAD is a tool to diagnose TCP performance issues. I hit the following issue when compiling the CLI client (diag-client.c) on Solaris 10 x86:
cc diag-client.c -o diag-client
Undefined first referenced
symbol in file
gethostbyname diag-client.o
socket diag-client.o
connect diag-client.o
ld: fatal: Symbol referencing errors. No output written to diag-client
Fixed linkage with
cc -lsocket -lnsl -lm diag-client.c -o diag-client