bug-coreutils
[Top][All Lists]
Advanced

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

Re: sort does not use tab as delimiter


From: The Wanderer
Subject: Re: sort does not use tab as delimiter
Date: Sun, 10 Dec 2006 08:30:51 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922

Bob Proulx wrote:

The Wanderer wrote:

I've never used Ctrl-V to paste in Linux except in Mozilla, and
frankly, I don't think I'd have expected it to work outside of
things like OpenOffice and so forth (i.e., graphical applications,
mostly Windows-alikes). I've always used "highlight and
middle-click", particularly in xterms, and that very definitely
does not allow the literal entry of tabs into bash.

Actually, I just tested - entered a tab in this mail, copied it
with Ctrl-C, attempted to paste it into an xterm with Ctrl-V. No
result.

You are confusing MS-Windows style cutting and pasting with bash
command line reading of input.  They are not related.  Put it right
out of your head at this moment!

<shrug> I work with what my experience has exposed me to. In every
environment I've ever beeb remotely familiar with except possibly the
Apple //c, Ctrl-V has either meant "paste from clipboard" or pretty much
nothing at all.

(And, Brian: I'm a little startled that you'd suggest *reading* the bash
man page. The bash man page is longer, more complicated, drier, and more
technically written than any other I've ever encountered besides the gcc
man page. I use it as a reference when I need to look something up, but
I've never even *considered* actually reading through the whole thing -
and that's coming from someone who *has* been known to read computer
reference books for fun.)

Bash uses C-v to mean the same thing that it does in vi, to input the
next character verbatim.  The old vi man page used to say this:

     ^V          In input mode, ^V quotes the next character to permit
                 the insertion of special characters (including ESC)
                 into the file.

Bash uses both C-v and C-q for this purpose.

So, effectively an escape command like \, only entry-time instead of
parse-time (though it also reminds me of the way the meta-key works on
my system, with Ctrl-V as the toggle instead of Esc). Sensible enough, I
suppose, but not remotely obvious if you don't expect it.

As it happens, I thought the vi interface sounded unusable - or, at
least, obstructive - from the first time I read about it, and the few
times I've found myself inside the program have done nothing to dispel
that impression. It is therefore unsurprising that I would not be
familiar with its standard syntax.

C-v is vi-like and C-q is emacs-like.  In emacs it quotes the next
character.  However the tty driver is usually configured to intercept
C-q to XON after an XOFF so most users have learned C-v for this
purpose in the bash shell.

I've never gotten around to learning emacs, though I certainly intend to
at some point (I've tried the internal tutorial, it didn't really help).
Still, this is useful information; thank you.


(I'm a little surprised to see that three list regulars have decided to
keep this discussion on-list; I deliberately left the Reply-To header
unset, because I didn't really think this was on-topic here. I thought
I'd receive maybe one private reply and none on-list; instead I've
gotten three on-list and one duplicate - and hence inappropriate, though
in this case I don't strongly object - private copy. I don't
particularly object to the discussion remaining on-list, but as I said,
it's a little unexpected.)

--
      The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]