[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Wed, 30 Nov 2005 07:52:42 -0500 -->
- <!--x-from-r13: psbjyre ng bhgcbfgfragvary.pbz (Quevfgbcure Tbjyre) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Bash history -->
- <li><em>date</em>: Wed, 30 Nov 2005 07:52:42 -0500</li>
- <li><em>from</em>: cfowler at outpostsentinel.com (Christopher Fowler)</li>
- <li><em>in-reply-to</em>: <<a href="msg00427.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00426.html">[email protected]</a>> <<a href="msg00427.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] Bash history</li>
[cfowler at shuttle ~]$ history | tail
991 vim ~/.bashrc
992 source ~/.bashrc
993 history | grep mkiso
994 rexec 688
995 cd cloop-2.02/
996 sudo mount -o loop ./filesystem2.img /mnt/loop0/
997 mount
998 sudo -s
999 history | grep cdrecord
1000 history | tail
[cfowler at shuttle ~]$
Say I want to redo the mount without retyping. I just want to specify
the line number in the history buffer.
I specified bash and bash can be loaded on many unix systems therefore
making this consistent.
On Wed, 2005-11-30 at 07:44 -0500, W. Keith Miller wrote:
> !683
>
> Note: this isn't always consitent across Unices.
>
>
>
>
>
> Christopher Fowler wrote:
>
> >Is there a trick to executing commands in the bash history.
> >
> ># history | grep long_command
> ># exec 683
> >
> >
> >I've written a perl script that takes the bash history as stdin and then
> >executes the command
> >
> ># history | /tmp/history.pl 683
> >
> >Works but not an elegant solution.
> >
> >_______________________________________________
> >Ale mailing list
> >Ale at ale.org
> ><a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
> >
> >
> >
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00429" href="msg00429.html">[ale] Bash history</a></strong>
<ul><li><em>From:</em> meuon at geeklabs.com (Mike Harrison)</li></ul></li>
<li><strong><a name="00435" href="msg00435.html">[ale] Bash history</a></strong>
<ul><li><em>From:</em> stillwaxin at gmail.com (Michael Still)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00426" href="msg00426.html">[ale] Bash history</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00427" href="msg00427.html">[ale] Bash history</a></strong>
<ul><li><em>From:</em> smeadspam100 at speedfactory.net (W. Keith Miller)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00427.html">[ale] Bash history</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00429.html">[ale] Bash history</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00427.html">[ale] Bash history</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00429.html">[ale] Bash history</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00428"><strong>Date</strong></a></li>
<li><a href="threads.html#00428"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>