Re: Sort within VI with parameters

Jay Strauss <[email protected]> Sun, 26 Jun 2011 18:15:11 -0500
Newsgroups gmane.org.user-groups.luni.tech
Message-ID <[email protected]>
Hello All,

Thanks for responding.  Sorry for the delay my power went out, then I
disconnected all my computers to do some wiring, then a herd of
elephants ran through my house,
http://www.youtube.com/watch?v=9TuLBa-rgBk

I'll try the suggestions when I get back to work.

Thanks all
Jay

On Thu, Jun 23, 2011 at 2:59 PM, Jay Strauss <[email protected]> wrote:
> Hello,
>
> I want to sort a file within VIM using some sort parameters (i.e. I
> want to sort by the second column where my columns are | delimited)
>
> I can't figure out the proper incantation
>
> <esc>:%!sort -t| -k2,2
>
> I get an error like:
> '-k2' is not recognized as an internal or external command,
> operable program or batch file.
>
> I can't figure out the proper quoting or escaping needed to pass the
> parms to sort without VIM getting mad.
>
> Some sample data is:
> # Value|Alternate Value
> CHR|DC
> NTR|DO
> GST|GI
> FEM|LC
> NUR|NP
> OPT|OD
> RHB|OT
> NUR|PA
> RHB|PT
> NUT|RD
> NUR|RN
> PHR|RX
>
> Thanks
> Jay
>
-- 
Linux Users Of Northern Illinois (Chicago) - Technical Discussion 
http://luni.org/mailman/listinfo/luni