Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Filename=${Filename:1:1}
What am i doing wrong
Offline
I'll need help removing illegal character from filename.
I'm downloading files from a digital receiver (Topfield) thrue a wireless connection.
the filename has control characters and other illegal signs.
killall lftp
lftp -c 'open -e "mget -c -E -O /mnt/HD_a2/AV-Media/Topfield/tmp *.rec" 192.168.0.2:/DataFiles/Xfer'
for file in /mnt/HD_a2/AV-Media/Topfield/tmp/*.rec
do
Path=${file%/*}
Path=${Path%/*}
tmpFilename=${file##*/}
schar=`expr "$tmpFilename" : '\(.\)'`
tmpFilename=${tmpFilename#$schar}
Filename=""
while [ "$schar" != "" ]
do
#tmptest=`expr "$schar" : '\([[:alnum:][:blank:]._-]\)'`
#if [ "$tmptest" != "" ]
if [ "`expr "$schar" : '\([[:alnum:][:blank:]._-]\)'`" != "" ]
then
Filename="$Filename$schar"
else
Filename="$Filename""_"
fi
schar=`expr "$tmpFilename" : '\(.\)'`
tmpFilename=${tmpFilename#$schar}
done
Filename="$Path/$Filename"
mv "$file" "$Filename"
chmod a+rw -v "$Filename"
echo $Filename
done
Offline