Code Golf: File extension
t(){ echo ${1##*.};}
for f in hi.txt carrot.meme lol what..is..this..file \
.bashrc [email protected][]h agent.000; do
printf '%s -> %s\n' "$f" "$(t "$f")"
done
INFO
t(){ echo ${1##*.};}
for f in hi.txt carrot.meme lol what..is..this..file \
.bashrc [email protected][]h agent.000; do
printf '%s -> %s\n' "$f" "$(t "$f")"
done