Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

read builtin



I'm confused.  (not that that's very suprising...)

I'm trying to write a script to automate some tasks here for others who
have a problem remembering all of the command line switches.  So, I'm
making it output questions, and reading responces back in.  I'm trying to
do this with the read builtin.

My first attempt is:

read DIRE?'What directory do you want them to use? [full path] '

This errors out with No matches found DIRE?That...

According to the docs:

`read [ -rzpqAclneE ] [ -k [NUM] ] [ -uN ] [ NAME?PROMPT ] [ NAME ... ]'
...
     If the first argument contains a `?', the remainder of this word is
     used as a `prompt' on standard error when the shell is
     interactive.  The exit status is `0' unless an end-of-file is
     encountered.

What am I doing wrong?

Thanks;
Jason

-- 
Jason Price  Theta Xi, BA 449 /    All that is gold does not glitter.
aspiring CompSci major        /    Not all those who wander are lost.
Georgia Tech Penitentiary     /    --- J.R.R. Tolkien
zapman@xxxxxxxxxxxxx          /



Messages sorted by: Reverse Date, Date, Thread, Author