LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Shell tip: bang commands...

[ILUG] Shell tip: bang commands...

kevin lyda kevin at ie.suberic.net
Mon May 15 12:02:37 IST 2006


On Sun, May 14, 2006 at 11:43:29AM +0100, Colm Buckley wrote:
> And in zsh you can use <tab> to expand any history substitutions  
> before execution.

Yes, and it can expand shell wildcards and env vars too.  And with setopt
histverify it will expand all the bang sequences on a new command line
when you press return.

On Sun, May 14, 2006 at 08:45:16PM +0200, Brian Foster wrote:
>  fscking wall!  (I'm an _original_ Bourne shell
>  person from way back, and only switched first
>  to Korn ksh(1), and then GNU bash(1), when they
>  got Rob Pike's “cd spelling correction” — albeit
>  neither implemented it quite properly ....  ;-(  ).

what, no "darn kids!"?

On Sun, May 14, 2006 at 02:48:08AM +0100, Sarah Fortune wrote:
> In bash you can use Alt-. to fill in the last argument, it's nicer than !$
> because you can see what it is before running the command.

Nicer, perhaps - but note how grumpy it makes poor Brian.  That's time
he could be spending shaking his fists at kids driving over 30kph in
their motorised carriages.

If you need to switch between shells and machines, the ! commands are
pretty portable these days.  Most shells have other ways to access and
manipulate history, but the bang commands are kind of a lowest common
denominator.

Kevin

-- 
Kevin Lyda                US Citizen Abroad?  Had Enough?  Register
kevin at ie.suberic.net      **** to vote: www.VoteFromAbroad.org ****



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell