Tools and things that make my life easier - y'all might like them too
extensions
Print extensions of file names. For each file, a line is printed in the following form:
Original filename|extension
Syntax: extensions [FILE ...]
There are no options. One or more file names must be specified as arguments.
$ find . -type f | extensions | headtail
1 ./pinger-20180215.out.gz|gz
2 ./pinger-20180325.out.gz|gz
3 ./pinger-20180304.out.gz|gz
4 ./pinger-20180302.out.gz|gz
5 ./pingbeep|
.
.
.
269 ./pinger-20180109.out.gz|gz
270 ./pinger-20180419.out|out
271 ./pinger-20180130.out.gz|gz
272 ./pinger-20180201.out.gz|gz
273 ./pingplot|
$
headtail
tooluniqc
for a comprehensive breakdown of the extensions for the same files.foo.bar/FOOBAR
, the file name has no extension since the period appears in the parent directory of the file.