![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to read the column and print the values under that column | gemini106 | Shell Programming and Scripting | 6 | 03-28-2008 03:05 AM |
| How to check Null values in a file column by column if columns are Not NULLs | Mandab | Shell Programming and Scripting | 7 | 03-15-2008 05:57 AM |
| annoying vi yank word + delete all question | umen | UNIX for Dummies Questions & Answers | 4 | 03-20-2006 04:46 AM |
| Replace 10th column with a new column--- Terriblly hurry | ahmedwaseem2000 | Shell Programming and Scripting | 2 | 09-05-2005 10:10 PM |
| yank | giannicello | UNIX for Dummies Questions & Answers | 5 | 01-29-2003 10:17 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Yank a column in vi
I have a file which has data in columns.
Is there a way to yank columns in vi? I tried searching in this forum. I did not find it. Please help me out. |
| Forum Sponsor | ||
|
|
|
|||
|
Most versions of vi support the C-x commands.
Try man vi and look for open-rectangle, clear-rectangle, yank-rectangle, delete-rectangle If you have a big file and you want to lose,say all of column #5 in the entire file, try awk, it's a lot easier. Code:
awk ' { print $1, $2, $3 , $5, $6}' oldfile>newfile
|
| Thread Tools | |
| Display Modes | |
|
|