Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Bash / Shell Scripting (http://www.programmingforums.org/forum26.html)
-   -   Echoing the character & (http://www.programmingforums.org/showthread.php?t=6594)

jwilliam1203 Oct 24th, 2005 3:20 PM

Echoing the character &
 
Can anyone out there show me how to actually echo the character &

iignotus Oct 24th, 2005 3:23 PM

echo '&', echo "&", echo \&, etc. should work fine. Quoting or escaping, that is.

jim mcnamara Oct 25th, 2005 10:01 AM

& \ . * /

Are called metacharacters for the shell because the have special meaning

& - used to send a command to run in background

\ = so-called escape character because it means 'take the next chacacter literally'
as in echo \&

. current directory

* wildcard for file specifications

/ path separator, name of the root of all paths

mackenga Feb 21st, 2006 3:25 PM

...and all these metacharacters can be quoted/escaped as ignotus describes.

The Dark Feb 21st, 2006 5:45 PM

Quote:

Originally Posted by mackenga
...and all these metacharacters can be quoted/escaped as ignotus describes.

Was it worth dredging up a four month old thread, just to say that?

jim mcnamara Apr 27th, 2006 9:49 PM

Proabably :) get the humor... or not, it matters little

Jimbo Apr 28th, 2006 1:35 AM

Was it worth dredging up a 2 month dead thread, just to say that?

:banana:

The Dark Apr 28th, 2006 1:43 AM

Quote:

Originally Posted by Jimbo
Was it worth dredging up a 2 month dead thread, just to say that?

<banana deleted>

Was it worth dredging up a 4 hour old thread just to say that?


All times are GMT -5. The time now is 10:59 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC