pull_screenshots.sh script from Chiu-ki Chan's video on terminal tricks https://youtu.be/1N90lU1xn2w
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
today=$(date +%Y%m%d) | |
for path in $(adb shell ls /sdcard/Pictures/Screenshots/*"${today}"*); do | |
name=$(basename "$path") | |
if [ ! -f "$name" ]; then | |
adb pull "$path" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if it's due to zsh but I had to add ' around the shell statement. E.g.
Thanks a ton for creating this gist :)