Can anyone help me with a most frustrating problem.
I cant seem to find a way to embed a literal question mark (?)
character in a csh/tcsh variable.
> set test="Hello?World"
> echo $test
simply results in
echo: No match.
because it is trying to do some kind of file substitution.
I've tried escaping and using single and double quote combinations,
but to no avail.
Any help would be much appreciated....
Cheers,
James Bray
Try:
echo "$test"
echo $test:q
You may also want to switch to zsh ;)
--
Stephane
Thanks for that Stephanie, I think that should do nicely :-)
And no, no chance of moving to zsh (Windows Interix system)
Cheers,
James
Can I get this off my chest? The above is a real pet peeve of mine.
Names are important, people.
--
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
Here are several ways to do it:
prompt> set r = 'rtg?234'
prompt> echo "$r"
rtg?234
prompt> set r = "rtg?234"
prompt> echo "$r"
rtg?234
prompt> set b = "???${r}gfg$r"
prompt> echo "$b"
???rtg?234gfgrtg?234
Mine too. Stephanie should stick to her kitchen
and stop posting on comp.unix.shell
:-D
> At 2008-02-15 09:39AM, "James Bray" wrote:
> > On 15 Feb, 11:05, Stephane Chazelas <stephane_chaze...@yahoo.fr>
> > wrote:
> [...]
> > > --
> > > Stephane
> >
> > Thanks for that Stephanie, [...]
>
> Can I get this off my chest? The above is a real pet peeve of mine.
> Names are important, people.
As are genders.
p.s. Stephane's home page (and picture) is on
http://stephane.chazelas.free.fr/
Well, my apologies Stephane... twas a bit of a lame mistake....
And as far as you Glinn, well, we're not all perfect you know....