Re: Sort within VI with parameters
"Keith T. Garner" <[email protected]> Fri, 24 Jun 2011 09:00:57 -0500
| Newsgroups | gmane.org.user-groups.luni.tech |
|---|---|
| Message-ID | <[email protected]> |
This is way overkill, but it DOES work this way: :%!sh -c "sort -t '|' -k2,2" Also, the last form in Colin's mail had worked for me on the mac's default vi, haven't had a chance to try it in vim yet. On Jun 24, 2011, at 7:46 AM, Jay Strauss wrote: > Yeah that's what I think too > > I've tried every incantation ( and yours) with no success > > Thanks > Jay > > Sent from my iPhone > > On Jun 23, 2011, at 3:13 PM, [email protected] wrote: > >> >>> I can't figure out the proper incantation >>> >>> <esc>:%!sort -t| -k2,2 >> >> It looks like your field separator is getting interpreted as a >> shell pipe character. Try escaping it like so: >> >> <esc>:%!sort -t\| -k2,2 >> >> Or perhaps quoting it: >> >> <esc>:%!sort -t'|' -k2,2 >> >> Colin >> >> -- >> Linux Users Of Northern Illinois (Chicago) - Technical Discussion >> http://luni.org/mailman/listinfo/luni > -- > Linux Users Of Northern Illinois (Chicago) - Technical Discussion > http://luni.org/mailman/listinfo/luni -- Keith T. Garner [email protected] "Make no little plans; they have no magic to stir men's blood." - Daniel H. Burnham -- Linux Users Of Northern Illinois (Chicago) - Technical Discussion http://luni.org/mailman/listinfo/luni