Skip to content

Instantly share code, notes, and snippets.

@simbalinux
Created July 11, 2018 19:32
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 simbalinux/69184fa6934d70436d1de5efb3a96197 to your computer and use it in GitHub Desktop.
Save simbalinux/69184fa6934d70436d1de5efb3a96197 to your computer and use it in GitHub Desktop.
raw=/path/to/dir
files=("$raw"/*)
for each in "${files[@]}"; do
echo "$each"
sleep 3
done
count=${#files[@]}
files_ordered=()
for (( i = 0; i < count; i++ )); do
files_ordered+=("$raw/out$i.whatever")
done
#do whatever here "${files_ordered[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment