Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "+---------------------------------------------------------+"
- echo "+ Welcome to the DAMN Indexer Script +"
- echo "+ (for Macs) +"
- echo "+---------------------------------------------------------+"
- echo "+ Clearing previous index ... +"
- cd "${0%/*}" #changes working directory to path of script
- rm DAMN-index.txt > /dev/null 2>&1
- echo "+---------------------------------------------------------+"
- echo "+ Rebuilding Index ... +"
- find ../Root -type f ! -name '.DS_Store' -print0 | while IFS= read -r -d '' file; do
- printf '%s\n' "$file" >> DAMN-index.txt
- done #http://askubuntu.com/questions/343727/filenames-with-spaces-breaking-for-loop-find-command
- echo "+---------------------------------------------------------+"
- echo "+ Indexing Complete! +"
- echo "+---------------------------------------------------------+"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement