r2 - 11 Feb 2009 - 01:07:41 - Main.jisooyYou are here: TWiki >  Main Web > RtclMembers > JisooYang > JisooTechTips > JisooTechTipsShell

Shell commands

Repetition (bash)

$ for x in `some command generating list of items`; do actions involving $x; done

For example, to see all NFS automount map,

$ for x in `ypcat -k auto.master | cut -f2 -d' ' | cut -f3 -d\/`; do echo -e "\n$x:"; ypcat -k $x; done

Command line keyboard shortcuts (bash)

^A : move cursor to the start of line

^E : move cursor to the end of line

^W : delete a word before the cursor and yank the deleted content

^U : delete from the cursor to the start and yank

^K : delete from the cursor to the end and yank

^Y : insert yanked content before the cursor

^T : swap character on the cursor with the one before. (e.g., :abc -> acb)

-- Main.jisooy - 26 Nov 2008

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions

tip TWiki Tip of the Day
InterwikiPlugin links
The InterwikiPlugin automatically links ExternalSite:Page text to external sites based on aliases defined ... Read on Read more

 
Home
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback