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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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