Weird behaviour on echo

Andy Pieters mailings at vlaamse-kern.com
Mon Jul 18 09:06:44 UTC 2005


Thanks all for your replies and explanations.


With kind regards


Andy


On Monday 18 July 2005 07:35, Jeff Vian wrote:
> On Mon, 2005-07-18 at 00:56 +0200, Andy Pieters wrote:
> > Hi all
> >
> > Consider this
> >
> > ~]$ echo "Test!"
> > bash: !": event not found
> > ~] $ echo "Test"!
> > Test!
> > ~] $ echo 'Test!'
> > Test!
> > ~] $ echo Test!
> > Test!
> >
> > I haven't heard anything about expansion of the '!' character, have you?
>
> The ! is a special character in bash in some circumstances.  The "" can
> give it the special meaning.
>
> >From my documentation on bash,  !n references a previous command (the
>
> nth command),  it also allows use of characters to list previously
> issued (history) commands that start with that character(s)
> an example of the first use
>     [jeff at eye_gore ~]$ echo !12
>     echo mkdir temp2
>     mkdir temp2
>
> and the second
>    [jeff at eye_gore ~]$ echo !n
>    echo ncftp 192.168.2.10
>    ncftp 192.168.2.10
>
> So in that context the "!" structure forces it to be interpreted with a
> null argument and thus not a valid event to be referenced.
>
>    [jeff at eye_gore ~]$ echo "!"
>    bash: !: event not found
> is in a slightly different category though
>
> > With kind regards
> >
> >
> > Andy
> >
> >
> > --
> > fedora-list mailing list
> > fedora-list at redhat.com
> > To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list

-- 
Registered Linux User Number 379093
-- --BEGIN GEEK CODE BLOCK-----
Version: 3.1
GAT/O/>E$ d-(---)>+ s:(+)>: a--(-)>? C++++$(+++) UL++++>++++$ P-(+)>++
L+++>++++$ E---(-)@ W+++>+++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
e>++++$@ h++(*) r-->++ y--()>++++
-- ---END GEEK CODE BLOCK------
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a 
 php cli binary:
 
 http://www.vlaamse-kern.com/sas/
--

--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050718/1d51eb70/attachment-0001.sig>


More information about the fedora-list mailing list