Created
September 20, 2017 15:35
-
-
Save arodbits/f280251723b2c5e95a8dba63e33fdb94 to your computer and use it in GitHub Desktop.
unix: find files and split filename's parts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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