Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Bashing away at Unix



On Sat, Mar 15, 2008 at 06:19:01PM +0900, Stephen J. Turnbull wrote:
> SL Baur writes:
> 
>  > It's defined yes, but what does your system do when you run the script:
>  > 
>  > #! /bin/sh
>  > echo foo ^ bar
> 
> chibi:git-staging steve$ echo foo ^ bar
> foo ^ bar
> chibi:git-staging steve$
> 
>  > The correct answer probably is that you see "bar: not found".  Do
>  > you know why?
> 
> I don't know but will hazard a guess: buggy history expansion.  man is
> such a wonderful resource. :-)

No!

S L Baur already explained this, but I will admit that this reminds me
of an amusing time when I offered to test out a restricted shell that
was hacked together for a programming contest by one of the smartest
security brains I know (Ian Goldberg).  As a beautiful example of "the
smartest fencer can be disarmed by a trick he doesn't know", I blew his
cho-ultra-secure shell away by using ^ as a pipe character instead of |.
He hadn't read the bash man page carefully enough, and had missed that
it supported that particular ancient artifact.

Remember history, for if you forget, it will bite you in your arse.

--Dave


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links