Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
i'm getting some strange behavior when replacing strings
I'm getting a backslash (\�) in return
I'm trying to convert auto generated ftp mirror script, the sourse is a non unicode ftp and i'm using lftp
echo "mirror -c --script=$tmplftpMirrorScript ." >> $tmplftpGetScript
# Set the field seperator to a newline
IFS="
"
for line in `cat $tmplftpMirrorScript`; do
path=${line##*get }
path=${path##-c }
path=${path##-O }
path=${path%% ftp://*}
path=${path//\"/}
file=${line##*ftp://192.168.0.2}
filename=${line##*/}
sourcefile="$path/$filename"
sourcefile=${sourcefile//%C5/$'\xc5'} # å
sourcefile=${sourcefile//%C4/$'\xc4'} # ä
sourcefile=${sourcefile//%D6/$'\xd6'} # ö
sourcefile=${sourcefile//%E5/$'\xe5'} # Å
sourcefile=${sourcefile//%E4/$'\xe4'} # Ä
sourcefile=${sourcefile//%F6/$'\xf6'} # Ö
echo "line - $line"
echo "file - $file"
echo "path - $path"
echo "sourcefile - $sourcefile"
echo "sourcefile - $sourcefile" > /lftpscript/test.txt
hexdump -C /lftpscript/test.txt
line - get -O "/mnt/HD_a2/AV-Media/Topfield/tmp/Barn/H�ndige Manny" ftp://192.168.0.2/DataFiles/Barn/H%E4nd … -08-24.rec
file - /DataFiles/Barn/H%E4ndige%20Manny/H%E4ndige%20Manny%202009-08-24.rec
path - /mnt/HD_a2/AV-Media/Topfield/tmp/Barn/H�ndige Manny
sourcefile - /mnt/HD_a2/AV-Media/Topfield/tmp/Barn/H�ndige Manny/H\�ndige Manny 2009-08-24.rec
00000000 73 6f 75 72 63 65 66 69 6c 65 20 2d 20 2f 6d 6e |sourcefile - /mn|
00000010 74 2f 48 44 5f 61 32 2f 41 56 2d 4d 65 64 69 61 |t/HD_a2/AV-Media|
00000020 2f 54 6f 70 66 69 65 6c 64 2f 74 6d 70 2f 42 61 |/Topfield/tmp/Ba|
00000030 72 6e 2f 48 e4 6e 64 69 67 65 20 4d 61 6e 6e 79 |rn/H.ndige Manny|
00000040 2f 48 5c e4 6e 64 69 67 65 20 4d 61 6e 6e 79 20 |/H\.ndige Manny |
00000050 32 30 30 39 2d 30 38 2d 32 34 2e 72 65 63 0a |2009-08-24.rec.|
Offline