🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3840

Re: How can I print "*" in unix shell program

#3840
From: Robert Towster
Date: Sun, 12 May 2002 23:25
23 lines
2031 bytes
How about:
#!/bin/sh

set -f
echo *
set +f


����� 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
> 
> 
Technical Details
Message-ID: <3CDD8C9D.1070401@lastname.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!nntp.abs.net!uunet!dca.uu.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr30.news.prodigy.com.POSTED!not-for-mail
References: <abgerh$g5j$1@news1.kornet.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1012a6,76a163ff68bd9a1d
X-Google-Attributes: gid1012a6,public
X-Google-Thread: 105eb6,76a163ff68bd9a1d
X-Google-Attributes: gid105eb6,public
X-Google-Thread: fc89c,76a163ff68bd9a1d
X-Google-Attributes: gidfc89c,public
X-Google-ArrivalTime: 2002-05-12 16:26:08 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!nntp.abs.net!uunet!dca.uu.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr30.news.prodigy.com.POSTED!not-for-mail
Message-ID: <3CDD8C9D.1070401@lastname.com>
From: Robert Towster <ChangeTo_firstname@lastname.com>
Reply-To:  ChangeTo_firstname@lastname.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020510
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.unix.programmer,comp.unix.shell,han.comp.os.linux.devel
Subject: Re: How can I print "*" in unix shell program
References: <abgerh$g5j$1@news1.kornet.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 25
NNTP-Posting-Host: 64.219.220.104
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr30.news.prodigy.com 1021245932 ST000 64.219.220.104 (Sun, 12 May 2002 19:25:32 EDT)
NNTP-Posting-Date: Sun, 12 May 2002 19:25:32 EDT
Organization: Prodigy Internet http://www.prodigy.com
X-UserInfo1: Q[R_PJSCTS@[SQT[]BNNO_TDFRYB@GXLN@GZ_GYO^JWTEPIB_NVUAH_[BL[\IRKIANGGJBFNJF_DOLSCENSY^U@FRFUEXR@KFXYDBPWBCDQJA@X_DCBHXR[C@\EOKCJLED_SZ@RMWYXYWE_P@\\GOIW^@SYFFSWHFIXMADO@^[ADPRPETLBJ]RDGENSKQQZN
Date: Sun, 12 May 2002 23:25:32 GMT