[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need Creative Method to transfer a file



On Mon, Mar 04, 2002 at 03:08:18AM +0100, Carel Fellinger wrote:

keep replying to myself:(

I'm still trying to transport a file with minicom using minicoms `run
script' facility with the following as the local trasport script...

>      # cat <<EOF >/tmp/getit
>      echo 'sleep 1 && uuencode -m /path/to/ppp.deb -'
>      uudecode -o /tmp/ppp.deb
>      EOF
> 
> Side Note:
> for some reason this won't work if you leave out the `-m',
> complains about missing `end' line. Anyone care to explain?

...I soon figured out that it's because the terminal driver adds ^M's
so uudedoce sees an `end^M' and misses the `end' allright.

So the simple solution is to set the terminal in raw mode like:

   # cat <<EOF >/tmp/getit
   echo 'sleep 1 && stty raw && uuencode -m /path/to/ppp.deb - && stty -raw'
   uudecode -o /tmp/ppp.deb
   EOF

But I would like to leave the terminal as is, and filter it out, so I
thought of fromdos and `tr -d "\r"', but it won't work. A single cat
works, a second cat or fromdos or tr with or without cat fails????

   # cat <<EOF >/tmp/getit
   echo 'sleep 1 && uuencode -m /path/to/ppp.deb -'
   fromdos | uudecode -o /tmp/ppp.deb
   EOF

Still need an explanation:(

-- 
groetjes, carel



Reply to: