I am trying to write a script that will pull any photos or videos I've taken today. Here is what the code looks like:
for i in $(adb shell ls -l /sdcard/DCIM/Camera/ | grep $(date +%Y-%m-%d) | awk '{ print $7 }' ) ; do adb pull /sdcard/DCIM/Camera/$i ~/Photos ; done
And here is the error I get when I run it:
' does not existsdcard/DCIM/Camera/IMG_20160507_012827.jpg
It properly grabs the name the file(s) that need to be pulled, but for some reason it doesn't pass that information to "adb pull" properly.
Do I need to do something else to "sanitize" the output of one command into the input of the other?