Shell Tips and Tricks


Command Line Short cuts:

1.  You can edit  previous command/one liner in vi editor simply by pressing  "v". This takes the shell into vi mode.

Eg:      # for i in 0 1
            > do
            >  lspv | grep hdisk$i
            > done


Press  Esc+k


 Press  v

   
Update the Script, Added  2 3 and  press  :wq!  < To save and exit>


Now the command/Oneliner is executed .



No comments:

Post a Comment