Quick actions

cmd+k|ctrl+k

Navigation

Languages

Code Golf: File extension

Snippet info

Language

Bash

Visibility

public

Author

markjreed

Created

2022-12-31T16:26:03.163188Z

Updated

2022-12-31T16:26:03.163188Z

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