Command in vi - Block delete


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Command in vi - Block delete
# 1  
Old 02-27-2009
Command in vi - Block delete

What command I should provide in Vi so block deletionis possible ?
# 2  
Old 02-27-2009
at the top of the block you want to delete type "mx".
at the end of the block type "d`x".
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete first block of text with sed/awk

Hello, guys! "filename" has blocks with three lines each in this fashion: 93909286 #verified has one bug 10909286 #unverified pending 10909286 #unverified pendingThe above example has duplicate blocks, and I have tried using sed to remove just one block... The... (2 Replies)
Discussion started by: teresaejunior
2 Replies

2. Shell Programming and Scripting

tr command to delete zeros

Hi, I have a input string 0000106 I need to extract the number after leading zeros ie the number 106. I used the command tr -d "0" and got the output as 16. Could any one of you please help me in using the tr command to get the output 106. Thanks in advance.... (2 Replies)
Discussion started by: dean_amrita
2 Replies

3. UNIX for Dummies Questions & Answers

Date range command (and delete)

Hello. Newbie here.... I basically have a directory with tens of thousands (literally) subdirectories and need to delete those that are older than 2008 (hundreds) with all their contents. I've looked through all the RM parameters and still can't quite figure out how to specify the data range... (7 Replies)
Discussion started by: pqmomba8
7 Replies

4. Shell Programming and Scripting

delete block of lines when pattern does not match

I have this input file that I need to remove lines which represents more than 30 days of processing. Input file: On 11/17/2009 at 12:30:00, Program started processing...argc=7 Total number of bytes in file being processed is 390 Message buffer of length=390 was allocated successfully... (1 Reply)
Discussion started by: udelalv
1 Replies

5. Shell Programming and Scripting

How to delete the submitted at command

Hi I have submitted an at command to run next week . Now i want to remove the submitted at command . I dont want the job to run . Can anyone help me , with the command to remove the submitted at command . thanks in advance ... (3 Replies)
Discussion started by: rxg
3 Replies

6. Homework & Coursework Questions

Single command to delete a directory

Use and complete the template provided. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a command that will delete the john directory, and all of its contents. The problem I can't firgure out is how to create a absoute path to... (5 Replies)
Discussion started by: jorogon0099
5 Replies

7. Shell Programming and Scripting

sed command to delete row

I want to use sed command to delete a matched row with a pattern. And I also want to delete previous and next row of that row. Which option can I use with sed ? (9 Replies)
Discussion started by: anhtt
9 Replies

8. Shell Programming and Scripting

Delete a block of text delimited by blank lines when pattern is found

I have a file which contains blocks of text - each block is a multi-lines text delimited by blank lines eg. <blank line> several lines of text ... pattern found on this line several more lines of text ... <blank line> How do you delete the block of text (including the blank lines) when... (17 Replies)
Discussion started by: gleu
17 Replies

9. UNIX for Dummies Questions & Answers

regarding delete command in unix

Hai, The command sed 's/...$//' filename is not working.i need an unix command that works in the command mode i.e in the esc mode.pease let me know the command to delete the last 3 letters in every line of a file .The 3 letters vary from line to line. Regards suneetha. (3 Replies)
Discussion started by: gaddesuneetha
3 Replies

10. Shell Programming and Scripting

using sed(?) to delete a block of text

hello people, i am trying to accomplish what i thought should be a simple task: find a token in a file and delete a number (let's say 25) of lines following the token. in sed, i can't figure out how to do a relative address (i.e. something like /token/25dd to delete 25 lines) and in gnu grep,... (3 Replies)
Discussion started by: toast
3 Replies
Login or Register to Ask a Question