Name:Delete (or Cut/Paste) a Column
Author:Michelle (& Margaret)

How to delete a column in emacs
1) Place your cursor in the space directly in front of the column you want to
2) Hit Ctrl then Space.
3) Drag the cursor to the last line, stopping at the final character of the column
you want to delete. A good portion of your file will appear highlight.
3) Depress Ctrl+X. Wait for the ctrl+x prompt to appear on the command line. Then
type r and d. The column should be gone.
If you do something incorrectly, use Ctrl+_ to undo or Undo in the Edit menu. If you get stuck in the wrong command, use Ctrl-g to get out.


If you want to take a column out and put it elsewhere, here's how to cut and paste it:

same steps 1 & 2;

3) (alternate) then, in step 3, instead of typing "r," type "k" to remove the column.

4) to re-place it somewhere (probably somewhere else), press ctrl-X, then "r," then "y."

(Valerie is the real source of this part of the tip.)


another way, without using emacs or any text editors:

 awk '{print $2,$3}' input.txt > output.txt

This will take columns 2 and 3 from input.txt and write those columns to output.txt