[olug] Unix Tip: GET YOUR IP-ADDRESS (long explanation)

William E. Kempf wekempf at cox.net
Thu Mar 20 22:56:26 UTC 2003


Vincent said:
> Would you provide a long explanation for this one-line script ?  :)
>
> [ $# -gt 0 ] && ( while [ "$1" ]; do ( [ -f $1 ] && [ "$( file $1 | grep
> text)" ] ) && ( echo -e "$( grep -vE '^[[:space:]]*#|^[[:space:]]*$' $1
> | wc -l | tr -d '[[:space:]]' )\t$1" ); shift; done ) || echo "Usage: $0
> <file> [file file file ...]"

Like I said, the programmer in me loves Linux ;).

-- 
William E. Kempf




More information about the OLUG mailing list