[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what is > ?



On Fri, Dec 01, 2000 at 07:41:01PM -0700, cls-c/s wrote:
> in bash, i sometimes hit ' at the end of a command and i then get > on the next line.  what does > do?

> bt@cls411:~$ top'
> > 
> > 
> > 
> > 
> > 
> bt@cls411:~$ exit

The > prompt is bash's way of telling you that you haven't finished typing
in a command yet. When you typed the single quote you tell bash that you
are starting to type an argument and that characters that normally have
special meanings such as *, $, the space, and the carriage return, no
longer have those special meanings. Since the carriage return no longer has
it's special meaning (to tell bash you are done typing a command) bash just
interprets it as one more character to put into that argument. It will stay
in this mode until you type another single quote. The single quote retains
it's special meaning because otherwise you would have no way to stop typing
the argument, the backslash retains it's special meaning in case you have
to insert a single quote character into the argument. You can also still
abort the command with CTRL-C .

-- 
Harry Henry Gebel, ICQ# 76308382
West Dover Hundred, Delaware



Reply to: