From: malte@techfak.uni-bielefeld.de
To: rc@archone.tamu.edu
Subject: (much) more help on quoting
Date: Wed, 28 Aug 1991 09:22:37 -0500 [thread overview]
Message-ID: <9108281422.AA05585@dahlie.techfak.uni-bielefeld.de> (raw)
Ok, once again. I already received some answers to may request for help
on quoting. I assumed that my /bin/sh example was easy to understand.
So, a little more detailed:
prg -sample "`cat file`" (sh)
calls prg with _2_ arguments, "-sample", "the contents of file".
The second argument is a bytewise copy of files contents.
What I already have tried (rc):
prg -sample '`{ cat file }'
doesn't execute `{ cat file }, as expected.
prg -sample ''`{ cat file }''
gives all the words in file as single arguments to prg with leading and
trailing null strings, as expected.
prg -sample '''`{ cat file }'''
as above, but leading and trailing "'"s. Adding more quotes adds more null
strings or "'"s, as expected. Applying eval to these lines just shifts
the quoting problem.
prg -sample (`{ cat file })
Well, I not sure about that. Fact is, that each word in file is a single
argument.
tmp=`{ cat file }
prg -sample $^tmp
This passes the contents of file as a single argument, but applies $ifs,
drops "\n" and other control characters, in short, doesn't leave file
untouched.
I hope this makes it clear, especially for those who answered in an
insulting style.
Malte
next reply other threads:[~1991-08-28 14:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1991-08-28 14:22 malte [this message]
1991-08-28 17:48 ` John Mackin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9108281422.AA05585@dahlie.techfak.uni-bielefeld.de \
--to=malte@techfak.uni-bielefeld.de \
--cc=rc@archone.tamu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).