![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Posts: 1
Rep Power: 0
![]() |
Echoing the character &
Can anyone out there show me how to actually echo the character &
|
|
|
|
|
|
#2 |
|
Professional Programmer
|
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;} |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4
![]() |
& \ . * /
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 |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 314
Rep Power: 4
![]() |
...and all these metacharacters can be quoted/escaped as ignotus describes.
|
|
|
|
|
|
#5 | |
|
Expert Programmer
Join Date: Jun 2005
Posts: 816
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#6 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4
![]() |
Proabably
get the humor... or not, it matters little |
|
|
|
|
|
#7 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 748
Rep Power: 3
![]() |
Was it worth dredging up a 2 month dead thread, just to say that?
:banana: |
|
|
|
|
|
#8 | |
|
Expert Programmer
Join Date: Jun 2005
Posts: 816
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|