望麓自卑—湖南大学最具潜力的校园传媒

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1759|回复: 5

[资源共享] 一个命令的

[复制链接]
发表于 2005-5-13 23:30:14 | 显示全部楼层 |阅读模式
setenv:在mandrake里面等同的命令是什么哦?
好像是什么设置变量的路径的哦??
发表于 2005-5-14 15:51:26 | 显示全部楼层
export
发表于 2005-5-16 12:57:42 | 显示全部楼层
这个取决与你所用的shell,与系统发行版无关.

set  setenv 是csh tcsh下的变量设置命令.

export  declare是bsh bash下的变量设者命令.

在Bash下也可以直接用XXX=yyy来设置变量.
发表于 2005-5-23 13:47:13 | 显示全部楼层
richard@darling ~ $ man declare
Cannot open the message catalog "man" for locale "zh_CN"
(NLSPATH="<none>")

No manual entry for declare

谁把这个manual贴给我看看
发表于 2005-5-23 16:08:43 | 显示全部楼层
下面是引用中国之屎于2005-05-23 13:47发表的:
richard@darling ~ $ man declare
Cannot open the message catalog "man" for locale "zh_CN"
(NLSPATH="<none>")

No manual entry for declare
.......


export和declare是bash内置的,没有独立的manual.

在bash manual的"Shell Builtin Commands"一章中,有declare的比较详细的解释.


     declare [-afFirtx] [-p] [name[=value]]
     typeset [-afFirtx] [-p] [name[=value]]
          Declare variables and/or give them attributes.  If no names are
          given then display the values of variables.  The -p option will
          display  the  attributes  and  values of each name.  When -p is
          used, additional options are ignored.  The -F  option  inhibits
          the display of function definitions; only the function name and
          attributes are printed.  The -F option implies -f.  The follow-
          ing  options  can  be used to restrict output to variables with
          the specified attribute or to give variables attributes:
          -a    Each name is an array variable (see Arrays above).
          -f    Use function names only.
          -i    The variable is treated as an integer; arithmetic evalu-
              ation (see ARITHMETIC EVALUATION ) is performed when the
              variable is assigned a value.
          -r    Make  names  readonly.  These  names  cannot  then  be
              assigned  values  by subsequent assignment statements or
              unset.
          -t    Give each name the trace  attribute.  Traced  functions
              inherit  the  DEBUG  trap  from  the calling shell.  The
              trace attribute has no special meaning for variables.
          -x    Mark names for export to  subsequent  commands  via  the
              environment.

          Using  `+&#39; instead of `-&#39; turns off the attribute instead, with
          the exception that +a may not be used to destroy an array vari-
          able.  When used in a function, makes each name local, as with
          the local command.  The return value is  0  unless  an  invalid
          option  is encountered, an attempt is made to define a function
          using ``-f foo=bar&#39;&#39;, an attempt is made to assign a value to a
          readonly  variable,  an attempt is made to assign a value to an
          array variable without using  the  compound  assignment  syntax
          (see Arrays above), one of the names is not a valid shell vari-
          able name, an attempt is made to turn off readonly status for a
          readonly  variable, an attempt is made to turn off array status
          for an array variable, or an attempt is made to display a  non-
          existent function with -f.
发表于 2005-5-24 01:44:47 | 显示全部楼层
先谢啦
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

每日推荐上一条 /1 下一条

小黑屋|手机版|湖南大学望麓自卑校园传媒 ( 湘ICP备14014987号 )

GMT+8, 2024-11-27 17:43 , Processed in 0.061928 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表