09-28-04 08:31 AM
In article <cj1qsk$c0f$1@news.dialog.net.pl>,
"Stachu 'Dozzie' K." <cut-to-last-hypen-dozzie@dynamit.im.pwr.wroc.pl>
wrote:
> On 2004-09-24, rsine wrote:
>
> If you use bash or zsh you can try something like that:
> #v+
> ftp -nv ftplsite.com << 'EOF'
> user test $123abc
> put test.txt
> EOF
> #v-
>
> I don't know if it works with other shells.
The rule that quoting the end marker prevents variable expansion in the
here-document was in Bourne shell, so it should work with pretty much
any shell. It even works in C shell, although it requires you to
include the quotes around the marker in the here-document as well:
cat <<'EOF'
$123abc
'EOF'
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
[ Post a follow-up to this message ]
|