Re: Weird behaviour on echo

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

 



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@eye_gore ~]$ echo !12
>     echo mkdir temp2
>     mkdir temp2
>
> and the second
>    [jeff@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@eye_gore ~]$ echo "!"
>    bash: !: event not found
> is in a slightly different category though
>
> > With kind regards
> >
> >
> > Andy
> >
> >
> > --
> > fedora-list mailing list
> > fedora-list@xxxxxxxxxx
> > 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/
--

--

Attachment: pgpz6BeBIItby.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux