Skip to content

Instantly share code, notes, and snippets.

@arodbits
Created September 20, 2017 15:35
Show Gist options
  • Save arodbits/f280251723b2c5e95a8dba63e33fdb94 to your computer and use it in GitHub Desktop.
Save arodbits/f280251723b2c5e95a8dba63e33fdb94 to your computer and use it in GitHub Desktop.
unix: find files and split filename's parts
#!bin/sh
#directory: 2014/example.zip
find ./ -type f -name *.zip | awk -F'/' '{print $1}'
#the comand above would print out 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment