Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save leigh-johnson/7b62ecb6515a9e62da142a3686fab3c4 to your computer and use it in GitHub Desktop.
Save leigh-johnson/7b62ecb6515a9e62da142a3686fab3c4 to your computer and use it in GitHub Desktop.
Awk snippet: get the filename of each file from a space-separated list of full paths
awk 'BEGIN {FS="/"; RS=" ";}{print $NF;}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment