📜 ⬆️ ⬇️

We squeeze photos on bluetooth

On Habré regularly publish a variety of bash-scripts, simpler and more complicated - and I will make my contribution.
It so happened that I take a lot of photos on the phone - for this reason I wanted to have a way to automatically merge them onto a computer. This script requests a list of files on the phone, compares it with the local list and loads the missing files. It relies on the obexftp utility available in most distributions. I have it hanging in cron'e at 6 am - quite comfortable. In general, using it you can get not only photos - in general, it is a simple data synchronization utility.
Notes on use and the script itself under habrakat.

In order to use this script you just have to set the correct values ​​of these variables:
DEVICE - the bluetooth address of your device, you can find out with the help of the command “hcitool scan”.
REMOTE_DIR, LOCAL_DIR - remote and local data folders.
TMP_DIR - temporary folder
VERBOSE - “volatility” by default, “yes” or “no”. also controlled by the "-v" switch
FILE_FORMAT - regular expression (sed) on file names. to receive all files: [^ \ "] *

Actually script:

Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  1. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  2. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  3. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  4. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  5. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  6. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  7. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  8. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  9. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  10. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  11. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  12. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  13. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  14. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  15. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  16. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  17. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  18. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  19. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  20. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  21. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  22. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  23. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  24. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  25. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  26. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  27. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  28. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  29. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  30. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  31. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  32. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  33. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  34. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  35. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"
  36. Copy Source | Copy HTML #!/bin/bash DEVICE= "00:1A:75:C5:28:FB" REMOTE_DIR= "/Memory Stick/DCIM/100MSDCF" LOCAL_DIR= "$HOME/mobile_phone/photo/" TMP_DIR= "/tmp" VERBOSE= "no" FILE_FORMAT= "DSC.....\.JPG" if [ "$1" == "-v" ]; then VERBOSE= "yes" fi tmplist= "$TMP_DIR/getphoto_$PPID" obexftp -b "$DEVICE" -l "$REMOTE_DIR" > "$tmplist" 2>/dev/null if [ ! "$?" ]; then rm -f -- "$tmplist" echo "No mobile phone found. Please check the bluetooth connection." exit 1 fi cd "$LOCAL_DIR" return_code=0 grep '<file' -- "$tmplist" | sed -e 's/<file name=\"\(' $FILE_FORMAT '\)\".*/\1/' | while read filename do if ! test -a "$filename" ; then obexftp -b "$DEVICE" -g "$REMOTE_DIR/$filename" 1>/dev/null 2>/dev/null if [ ! "$?" ]; then echo "Error downloading file: '$filename'" return_code=2 else if [ "$VERBOSE" == "yes" ]; then echo "File '$filename' downloaded successfully" fi fi fi done rm -- "$tmplist" exit "$return_code"


')

Source: https://habr.com/ru/post/51990/


All Articles