Skip to content

Instantly share code, notes, and snippets.

@Theprim0
Created April 8, 2020 20:50
Show Gist options
  • Save Theprim0/2413e148a98bb88d1b022c7100acf8c5 to your computer and use it in GitHub Desktop.
Save Theprim0/2413e148a98bb88d1b022c7100acf8c5 to your computer and use it in GitHub Desktop.
hola=$(for d in /tmp/bareos-restores/_percona/250/*/xtrabackup_info; do
printf '%s\t%s\n' "$(grep start_time "$d")" "$(basename "$(dirname "$d")")"
done | sort | cut -f2-)
for a in $hola; do
array=("${array[@]}" "$a")
done
echo ${array[@]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment