Article View: comp.unix.programmer
Article #3839Re: How can I print "*" in unix shell program
From: laura fairhead
Date: Fri, 10 May 2002 17:24
Date: Fri, 10 May 2002 17:24
35 lines
2190 bytes
2190 bytes
On Fri, 10 May 2002 21:52:35 +0900, "�����" <myunggyu@hotmail.com> 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
You don't need quotes with the assignement because pathname expansion
isn't done on assignment words, however anywhere else in the line
unquoted fields are usually subject to pathname expansion so you do need
to quote the variable in the 'echo' command;
AA=*
echo "$AA"
>[root@ns /root]# ./a.sh
>Desktop a.sh dnsCache.db hostsInfo.db intop_history manage nsmail ntop_pw.db
>sec
>
>
seeya
--
laura fairhead # laura@madonnaweb.com http://lf.8k.com
# if you are bored crack my sig.
1F8B0808CABB793C0000666667002D8E410E83300C04EF91F2877D00CA138A7A
EAA98F30C494480157B623C4EF1B508FDED1CEFA9152A23DE35D661593C5318E
630C313CD701BE92E390563326EE17A3CA818F5266E4C2461547F1F5267659CA
8EE2092F76C329ED02CA430C5373CC62FF94BAC6210B36D9F9BC4AB53378D978
80F2978A1A6E5D6F5133B67B6113178DC1059526698AFE5C17A5187E7D930492
Technical Details
Message-ID:
<3cdc01b3.58260859@NEWS.CIS.DFN.DE>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!host62-7-73-40.in-addr.btopenworld.COM!not-for-mailReferences:
<abgerh$g5j$1@news1.kornet.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fc89c,76a163ff68bd9a1d X-Google-Attributes: gidfc89c,public X-Google-Thread: 105eb6,76a163ff68bd9a1d X-Google-Attributes: gid105eb6,public X-Google-Thread: 1012a6,76a163ff68bd9a1d X-Google-Attributes: gid1012a6,public X-Google-ArrivalTime: 2002-05-10 10:27:26 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!host62-7-73-40.in-addr.btopenworld.COM!not-for-mail From: laura@madonnaweb.com (laura fairhead) Newsgroups: comp.unix.programmer,comp.unix.shell,han.comp.os.linux.devel Subject: Re: How can I print "*" in unix shell program Date: Fri, 10 May 2002 17:24:14 GMT Organization: that'll be the daewooo :) Lines: 35 Message-ID: <3cdc01b3.58260859@NEWS.CIS.DFN.DE> References: <abgerh$g5j$1@news1.kornet.net> Reply-To: laura@madonnaweb.com NNTP-Posting-Host: host62-7-73-40.in-addr.btopenworld.com (62.7.73.40) X-Trace: fu-berlin.de 1021051644 18546641 62.7.73.40 (16 [53286]) X-Newsreader: Forte Free Agent 1.21/32.243