<html><head></head><body><p dir="ltr">It's easier to press one arrow key a few times than to type out a command phrase.</p>
<br><br><div class="gmail_quote">Jim Wildman &lt;jim@rossberry.com&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><br />With bash<br />!?phrase<br />will search for and execute that last command containg phrase<br /><br />history | grep apt (as others said) will find the command, with the<br />command number in front<br /><br />!number will execute that command<br />!number:s/oldphrase/newphrase/  will edit and then execute the command<br /><br />you can do similar things with the 'fc' command which will open your<br />default editor with the given command. The command executes when you<br />exit the editor.<br /><br />   983  exit<br />   984  ls<br />   985  ls<br />   986  cd rossdev<br />   987  ls<br />   988  cat rbhosts.txt<br />   989  svn up<br />   990  exit<br />   991  scdr<br />   992  pine<br />   993  screen<br />   994  scdr<br />   995  scdr<br />   996  scdr<br />   997  exit<br />   998  scdr<br />   999  exit<br />  1000  scdr<br />  1001  man fc<br />  1002  history 20<br /><br />fc 988<br />opens vi with "cat rbhosts.txt" in the buffer<br /><br !
 />When I
see someone who only uses the arrow keys, I know they have not<br />gotten serious about efficient command line use.<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> csh (sorry, no idea off the top of my head). <br /> <br /> Alternately, if you need a reason to use zsh, here's one more:  you can type<br /> 'apt' and then use the up arrow to reverse through full commands in your<br /> history that start with "apt".<br /> <br /> <br /> <br /> </blockquote><br /><br /><hr /><br />Jim Wildman, CISSP, RHCE       jim@rossberry.com <a href="http://www.rossberry.net">http://www.rossberry.net</a><br />"Society in every state is a blessing, but Government, even in its best<br />state, is a necessary evil; in its worst state, an intolerable one."<br />Thomas Paine</pre><p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />colug-432 mailing list<br
/>colug-432@colug.net<br /><a href="http://lists.colug.net/mailman/listinfo/colug-432">http://lists.colug.net/mailman/listinfo/colug-432</a><br /></pre></blockquote></div><br>
-- <br>
Sent from Kaiten Mail. Please excuse my brevity.</body></html>