Monthly Archives: August 2009

use kill with awk

kill `ps -ef | awk ‘{if($11~/WorkOrderProcessor/) print$2}’`

Posted in linux | Leave a comment

VI command – D & x

D The D command deletes from the cursor position to the end of the line. (D is a shortcut for d$.) x Often you want to delete only one or two characters. Just as r is a special change command … Continue reading

Posted in linux | 1 Comment

VI command – dw&dd

dw dw deletes a word beginning where the cursor is positioned. Notice that the space following the word is deleted. dd The dd command deletes the entire line that the cursor is on. dd will not delete part of a … Continue reading

Posted in linux | 2 Comments

VI command – (~)

~ Changing the case of a letter is a special form of replacement. The tilde (~) command will change a lowercase letter to uppercase or an uppercase letter to lowercase. Position the cursor on the letter whose case you want … Continue reading

Posted in linux | 2 Comments

VI command – r & s

r One other replacement edit is given by the r command. r replaces a single character with another single character. You do not have to press ESC to return to command mode after making the edit. s The S command, … Continue reading

Posted in linux | 3 Comments

VI command – cw&cc

cw To change a word, combine the c (change) command with w for word. You can replace a word (cw) with a longer or shorter word (or any amount of text). cw can be thought of as “delete the word … Continue reading

Posted in linux | Leave a comment