Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 24th, 2005, 3:20 PM   #1
jwilliam1203
Newbie
 
Join Date: Oct 2005
Posts: 1
Rep Power: 0 jwilliam1203 is on a distinguished road
Echoing the character &

Can anyone out there show me how to actually echo the character &
jwilliam1203 is offline   Reply With Quote
Old Oct 24th, 2005, 3:23 PM   #2
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
echo '&', echo "&", echo \&, etc. should work fine. Quoting or escaping, that is.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Old Oct 25th, 2005, 10:01 AM   #3
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
& \ . * /

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
jim mcnamara is offline   Reply With Quote
Old Feb 21st, 2006, 3:25 PM   #4
mackenga
Professional Programmer
 
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 314
Rep Power: 4 mackenga is on a distinguished road
...and all these metacharacters can be quoted/escaped as ignotus describes.
mackenga is offline   Reply With Quote
Old Feb 21st, 2006, 5:45 PM   #5
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 816
Rep Power: 4 The Dark is on a distinguished road
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?
The Dark is offline   Reply With Quote
Old Apr 27th, 2006, 9:49 PM   #6
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
Proabably get the humor... or not, it matters little
jim mcnamara is offline   Reply With Quote
Old Apr 28th, 2006, 1:35 AM   #7
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 748
Rep Power: 3 Jimbo is on a distinguished road
Was it worth dredging up a 2 month dead thread, just to say that?

:banana:
Jimbo is offline   Reply With Quote
Old Apr 28th, 2006, 1:43 AM   #8
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 816
Rep Power: 4 The Dark is on a distinguished road
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?
The Dark is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:48 PM.

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