由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - 如何显示出“*”
相关主题
pine中的中文输入问题如何实现下列功能?
question about a unix command总结一下:如何在unix下一次性rename n-多个文件名
HELP: How to get rid of unwanted characters in file name问一个弱智的问题
再次急问: *.tgz 文件怎么解?unix shell help?
emergencyChinese Character
How to view chinese character in Linux or Unixunix中有没有类似于dos里面 tree 的命令?
how to transfer C program run under VC to Unix?how to get the backgroup run state?
any solution to view Chinese in unix console?[转载] 问个Unix命令组合
相关话题的讨论汇总
话题: set话题: echo话题: 显示话题: 如何话题: use
进入Unix版参与讨论
1 (共1页)
u*******n
发帖数: 119
1
如果进行下面一步操作:
set a = "*"
echo $a
则将会出现该目录下所有文件名,而如何能将“*”本身赋值
给变量a,使echo $a显示的只是“*”,HOW TO DO THAT ?
m*****e
发帖数: 4193
2
set a="'*'"

【在 u*******n 的大作中提到】
: 如果进行下面一步操作:
: set a = "*"
: echo $a
: 则将会出现该目录下所有文件名,而如何能将“*”本身赋值
: 给变量a,使echo $a显示的只是“*”,HOW TO DO THAT ?

u*******n
发帖数: 119
3

spitfire 116: set a="'*'"
spitfire 117: echo $a
echo: No match

【在 m*****e 的大作中提到】
: set a="'*'"
d*****g
发帖数: 36
4
that's easy:
set a = '*'
(or set a = "*" )
echo "$a" <======= with " "
will display as:
*

【在 u*******n 的大作中提到】
:
: spitfire 116: set a="'*'"
: spitfire 117: echo $a
: echo: No match

u*******n
发帖数: 119
5
hehe....
I want "echo $a" ----> *
Not just echo "*"----> *
如何能将“*”本身赋值给变量a,使echo $a显示的只是“*” ?

【在 d*****g 的大作中提到】
: that's easy:
: set a = '*'
: (or set a = "*" )
: echo "$a" <======= with " "
: will display as:
: *

c*****t
发帖数: 1879
6
Your question is unclear.

【在 u*******n 的大作中提到】
: hehe....
: I want "echo $a" ----> *
: Not just echo "*"----> *
: 如何能将“*”本身赋值给变量a,使echo $a显示的只是“*” ?

d*****g
发帖数: 36
7
hehe, I don't understand what you mean.....
You need to learn some basic of UNIX SHELLL ...
Please first learn the difference for following commands:
set a = "*" NOTE: please don't use: set a = *
1) echo $a
2) echo "$a"
I have to point out:
set a = '*'
set a = *
set a = "*"
are not the same.
if you use set a = *
you will always set a as current directory's files, not
character * ....
only use set a ='*' or set a ="*", just asign character * to
a
have you tried 2)?? it will j

【在 u*******n 的大作中提到】
: hehe....
: I want "echo $a" ----> *
: Not just echo "*"----> *
: 如何能将“*”本身赋值给变量a,使echo $a显示的只是“*” ?

1 (共1页)
进入Unix版参与讨论
相关主题
[转载] 问个Unix命令组合emergency
问一个新手的问题How to view chinese character in Linux or Unix
Re: 为什么emacs自动给我加^M.how to transfer C program run under VC to Unix?
Re: 怎么在UNIX下面放CD?any solution to view Chinese in unix console?
pine中的中文输入问题如何实现下列功能?
question about a unix command总结一下:如何在unix下一次性rename n-多个文件名
HELP: How to get rid of unwanted characters in file name问一个弱智的问题
再次急问: *.tgz 文件怎么解?unix shell help?
相关话题的讨论汇总
话题: set话题: echo话题: 显示话题: 如何话题: use