[plt-scheme] here-string
Bruce,
Thanks for the reply, but as Felix mentions, I was hoping for a more
WYSIWYG-ish solution where I didn't have to worry about the
double-quotes (or newlines). Any ideas on how to get either of the
following?
Either something like the following from the scsh manual:
(run (csh -c #<<EOF
cd /urops
rm -rf *
echo All done.
EOF
))
or even something like the following might be OK (but it's probably
not quite as nice):
(define sh-code-1
(here-string
alias modemup='su -c "ifdown eth0;wvdial &"'
alias modemdown='su -c "killall wvdial;ifup eth0"'))
=>
alias modemup='su -c "ifdown eth0;wvdial &"'
alias modemdown='su -c "killall wvdial;ifup eth0"'
(define sh-code-2
(format
(here-string
alias ~a='su -c "~a"'
alias ~a='su -c "~a"')
"modemup"
"ifdown eth0;wvdial &"
"modemdown"
"killall wvdial;ifup eth0"))
Many thanks!
--David
On Sat, Mar 06, 2004 at 11:45:07AM -0500, Bruce Hauman wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> David J. Neu wrote:
> > For list-related administrative tasks:
> > http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> >Hi,
> >
> >I was wondering if something similar to scsh's line-delimited
> >here-strings exists in mzscheme?
> >
> >And if not, any ideas on how to roll something.
> >
> >Many thanks in advance!
> >
> >--David
>
> Forgive me if you already know this.
>
> (display
> "Here is a
> string that
> works as a
> here-string.
>
> You only have to
> watch out for the
> \" marks.")
>
> =>
>
> Here is a
> string that
> works as a
> here-string.
>
> You only have to
> watch out for the
> " marks.
>
> Cheers,
> Bruce