Advertisement
cd62131

Missing files

Jul 22nd, 2014
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.21 KB | None | 0 0
  1. #!/bin/bash -e
  2. typeset -i i
  3. typeset -i count=0
  4. for ((i = 0; i < 1000; i++)); do
  5.   file=$(printf '%03d' $i)
  6.   if [ ! -e ${file} ]; then
  7.     echo ${file}
  8.     ((count++))
  9.   fi
  10. done
  11. echo "Missing ${count} files."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement