Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Strange prompt after a mistyping

8 views
Skip to first unread message

LINDSEY JEAN NICE

unread,
Jan 19, 1996, 3:00:00 AM1/19/96
to
If I mistype a command and put a ' after it, i.e. pwd', I end up with a
> prompt and nothing seems to work except a ctrl-d to escape.
What did I do and where did I end up?

Thank you,
Kerry Nice

Kees J Bot

unread,
Jan 20, 1996, 3:00:00 AM1/20/96
to

The shell, the program that reads and executes commands, allows you to
quote arguments with either ', or ". Examples:

$ echo no quotes here
no quotes here
$ echo 'this is quoted'
this is quoted

Thanks to the quotes the string "this is quoted" is seen as a
single argument to echo and not broken up into three arguments. You can
even include newlines:

$ echo 'one
> two'
one
two

And that is where the > prompt comes into play, it is the shell's
"continuation prompt". It indicates that the current command isn't
finished.

I could start to explain the other shell quote, ", but there are good
books that explain it much better that me. Alas I don't know any
titles, I learned shell programming from the V7 UNIX manuals.
--
Kees J. Bot (k...@cs.vu.nl)
Systems Programmer, Vrije Universiteit Amsterdam

Will Rose

unread,
Jan 20, 1996, 3:00:00 AM1/20/96
to
Kees J Bot (k...@cs.vu.nl) wrote:
[...]
: I could start to explain the other shell quote, ", but there are good

: books that explain it much better that me. Alas I don't know any
: titles, I learned shell programming from the V7 UNIX manuals.

Kernighan and Pike, "The Unix Programming Environment", is probably a
good place to start. Tho' Holt, Reinhard & Wilson's "Unix Programmer's
Manual" is better, I only ever found vol II at a swap meet...

Will
c...@crash.cts.com


0 new messages