Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [ $# -lt 2 ] ; then
- echo "Not enough args"; exit 1
- fi
- args=( "$@" )
- # Get the time
- for time; do true; done
- # Time must be a number
- nr_regex='^[0-9]+$'
- if ! [[ $time =~ $nr_regex ]] ; then
- echo "Not a number $time"
- exit 2
- fi
- for arg in ${args[@]}
- do
- if [ -d $arg ] ; then
- # Search $arg
- find $arg -type f -mmin $time -exec echo '{}' ';'
- find $arg -type f -mmin "+$time" -exec echo '{}' ';'
- fi
- done
- # TODO
- # https://stackoverflow.com/questions/13360091/how-to-reverse-array-in-bash-onliner-for-loop
- # https://stackoverflow.com/questions/8247433/remove-the-last-element-from-an-array
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement