Article View: comp.unix.programmer
Article #3844Re: How can I print "*" in unix shell program
From: Pascal Bourguignon
Date: Mon, 13 May 2002 01:40
Date: Mon, 13 May 2002 01:40
41 lines
2302 bytes
2302 bytes
Robert Towster <CHANGE_TO_firstname@lastname.com> writes:
> how about:
> set -f
> echo *
> set +f
Yes! I can do more complicated too:
echo '#include <stdio.h>@int main(void){printf("*\n");return(0);}@'|tr '@' '\012'>a.c;cc a.c;a.out
> �������큱�� wrote:
> > I wanna print *
> > But following script prints files in current directory
> > How can I print *
> >
> > [root@ns /root]# cat a.sh
> > #!/bin/sh
> >
> > AA="*"
> > echo $AA
> > [root@ns /root]# ./a.sh
> > Desktop a.sh dnsCache.db hostsInfo.db intop_history manage nsmail ntop_pw.db
> > sec
--
__Pascal_Bourguignon__ (o_ Software patents are endangering
() ASCII ribbon against html- //\ the computer industry all around
/\ email & Microsoft attachments. V_/ the world http://lpf.ai.mit.edu/
1962:DO5K=1.3 2001:my($f)=`fortune`; http://petition.eurolinux.org/
You're a web designer? Please read http://www.useit.com/alertbox/ !
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d? s++:++(+++)>++ a C+++ UB+++L++++$S+X++++>$ P- L+++ E++ W++
N++ o-- K- w------ O- M++$ V PS+E++ Y++ PGP++ t+ 5? X+ R !tv b++(+)
DI+++ D++ G++ e+++ h+(++) r? y---? UF++++
------END GEEK CODE BLOCK------
Technical Details
Message-ID:
<87offklta9.fsf@thalassa.informatimago.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!thalassa.informatimago.COM!not-for-mailReferences:
<abgerh$g5j$1@news1.kornet.net> <3CDC786C.3000704@lastname.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fc89c,76a163ff68bd9a1d X-Google-Attributes: gidfc89c,public X-Google-Thread: 1012a6,76a163ff68bd9a1d X-Google-Attributes: gid1012a6,public X-Google-Thread: 105eb6,76a163ff68bd9a1d X-Google-Attributes: gid105eb6,public X-Google-ArrivalTime: 2002-05-12 18:40:37 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!thalassa.informatimago.COM!not-for-mail From: Pascal Bourguignon <too.much.spam@example.com> Newsgroups: comp.unix.programmer,comp.unix.shell,han.comp.os.linux.devel Subject: Re: How can I print "*" in unix shell program Date: 13 May 2002 03:40:14 +0200 Organization: informatimago.com Lines: 41 Message-ID: <87offklta9.fsf@thalassa.informatimago.com> References: <abgerh$g5j$1@news1.kornet.net> <3CDC786C.3000704@lastname.com> NNTP-Posting-Host: thalassa.informatimago.com (212.87.205.57) X-Trace: fu-berlin.de 1021254035 20607819 212.87.205.57 (16 [41911]) X-Newsreader: Gnus v5.7/Emacs 20.7