RE: Semi-OT: Vi Question/Need

From: Yong Huang <yong321_at_yahoo.com>
Date: Sat, 16 Mar 2013 20:31:12 -0700 (PDT)
Message-ID: <1363491072.3830.YahooMailClassic_at_web184804.mail.gq1.yahoo.com>



Yes, that's what I meant. But any command you type to meet Chris's original request is likely to take longer than what I suggested. If you use the console version of sqlplus (11g no longer has the Windows version), the execution plan is ready to be vertically selected and copied. If you copy the text into a file in a UNIX/Linux terminal, save it to a file, run cut -d, it most likely takes longer.

If you do use a command, cut is the right command to keep/discard text after certain character positions. awk or sed works on fields, although it is possible to force it to work on "columns" of character, maybe by setting -F to null and print all the fields from 1 to whatever "column" number you need.

Yong Huang

  • On Sat, 3/16/13, Mark W. Farnham <mwf_at_rsiz.com> wrote:

I think you mean from a character position to the end of the line for all lines?

I'd probably use sed or awk, whichever you know better, or cut, I suppose, but I use cut so rarely I have to look up the syntax.

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Yong Huang
Sent: Saturday, March 16, 2013 12:15 PM
To: Christopher.Taylor2_at_parallon.net
Cc: oracle-l_at_freelists.org
Subject: Re: Semi-OT: Vi Question/Need

> What is the simplest way to delete from a line POSITION to end of line
> through the whole file?

Others have made good suggestions. If I need to make such vertical-editing, I would display the text in Windows console with a wide window size (I actually use the console version of sqlplus so in this case, it's already in the console). Then I vertically select the text I need.

Some editors support vertical editing, MS Word, UltraEdit, gVim, even MS Outlook. In these editors, you can select and delete the part you don't need.

But for a very big file, using some command is preferred.

Yong Huang

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Mar 17 2013 - 04:31:12 CET

Original text of this message