Skip to content

Instantly share code, notes, and snippets.

@benosteen
Created September 17, 2013 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benosteen/6591918 to your computer and use it in GitHub Desktop.
Save benosteen/6591918 to your computer and use it in GitHub Desktop.
for zipfile in `ls *.zip`
do
echo "Unpacking $zipfile"
unzip $zipfile
echo "Attempting to add ${zipfile%.*} to HDFS directory 'BNB'"
hadoop fs -copyFromLocal ${zipfile%.*} BNB/${zipfile%.*}
echo "Removing unpacked ${zipfile%.*} from local directory"
rm ${zipfile%.*}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment