Skip to content

Instantly share code, notes, and snippets.

@droptableuser
Last active August 29, 2015 14:21
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 droptableuser/e0fbc97d0cc437ac9e8b to your computer and use it in GitHub Desktop.
Save droptableuser/e0fbc97d0cc437ac9e8b to your computer and use it in GitHub Desktop.
creates a flat file structure for software that can't handle directory structures
#!/bin/sh
val=`find -name "*.html"`
mkdir extract
for i in $val
do
cp $i extract/$(< /dev/urandom tr -dc a-z-0-9 | head -c${1:-10};echo;)_$(basename $i)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment