当前位置: 首页 > news >正文

crm微信管理系统如何做好网站站内优化

crm微信管理系统,如何做好网站站内优化,工装,苏州网站设计公司目录 0 引言1 type 命令的功能和格式 1.1 type命令的功能1.2 type 命令的格式2 type命令用法实例 2.1用type命令查看shell内置命令(以echo命令为例)2.2 用type命令查看别名(以ls命令为例)2.3 用type命令同时查看shell内置命令和别…

 目录

  1. 0 引言
  2. 1 type 命令的功能和格式
    1. 1.1 type命令的功能
    2. 1.2 type 命令的格式
  3. 2 type命令用法实例
    1. 2.1用type命令查看shell内置命令(以echo命令为例)
    2. 2.2 用type命令查看别名(以ls命令为例)
    3. 2.3 用type命令同时查看shell内置命令和别名(以echo和ls命令为例)
    4. 2.4 用type命令查看外部命令(以tty命令为例)
    5. 2.4 用type命令查看内部命令、别名和外部命令(以echo、ls和tty命令为例)
    6. 2.5 用type 命令查看函数
    7. 2.6 如果我们用内置命令或别名作为自

0 引言

在DOS中,type命令的功能是查看文件内容。

而在Linux中,type命令的功能与DOS中的大相径庭。

1 type 命令的功能和格式

我们可以使用 help type 命令查看 bash 中 关于type命令的帮助信息,其中包括了命令的功能 和格式。

purpleEndurer  @ bash ~ $ help type
type: type [-afptP] name [name ...]
    Display information about command type.
    
    For each NAME, indicate how it would be interpreted if used as a
    command name.
    
    Options:
      -a        display all locations containing an executable named NAME;
        includes aliases, builtins, and functions, if and only if
        the `-p' option is not also used
      -f        suppress shell function lookup
      -P        force a PATH search for each NAME, even if it is an alias,
        builtin, or function, and returns the name of the disk file
        that would be executed
      -p        returns either the name of the disk file that would be executed,
        or nothing if `type -t NAME' would not return `file'.
      -t        output a single word which is one of `alias', `keyword',
        `function', `builtin', `file' or `', if NAME is an alias, shell
        reserved word, shell function, shell builtin, disk file, or not
        found, respectively
    
    Arguments:
      NAME      Command name to be interpreted.
    
    Exit Status:
    Returns success if all of the NAMEs are found; fails if any are not found.
typeset: typeset [-aAfFgilrtux] [-p] name[=value] ...
    Set variable values and attributes.
    
    Obsolete.  See `help declare'.
purpleEndurer  @ bash ~ $ 

 1.1 type命令的功能

type命令 可以显示指定命令的信息,判断给出的指令是内部命令、外部命令(文件)、别名、函数、保留字 或者 不存在(找不到)。

1.2 type 命令的格式

type [-afptP] 命令1 [命令2 ...]

选项

选项说明备注
-a

显示包含指定命令的可执行文件的所有位置;

当且仅当未使用“-p”选项时,包括别名、内置函数和函数

all
-f禁止 查找 shell 函数function
-p如果给出的命令为外部指令,则显示其绝对路径path
-P强制对给合的每个命令进行 PATH 搜索,即使它是别名,内置命令,或函数,并返回将被执行的磁盘文件的名称        
-t当给定的命令为别名, shell保留字、shell 函数、shell 内置命令、外部命令(磁盘文)件或 未找到时,分别输出“alias”, “keyword”, “function”, “builtin”, “file” 或 空。type

2 type命令用法实例

2.1用type命令查看shell内置命令(以echo命令为例)

purpleEndurer  @ bash ~ $ type            # 不接任何选项和参数,无显示
purpleEndurer  @ bash ~ $ type echo       # 接命令,显示命令类型
echo is a shell builtin
purpleEndurer  @ bash ~ $ type -t echo    # 对内部命令使用 -t 参数,会显示# builtin,表示其为内部命令
builtin
purpleEndurer  @ bash ~ $ type -p echo    # 对内部命令使用 -p 参数,无显示
purpleEndurer  @ bash ~ $ type -a echo    # 使用 -a 参数,会将PATH变量中# 包含echo的命令显示出来
echo is a shell builtin
echo is /usr/bin/echo
echo is /bin/echo
purpleEndurer  @ bash ~ $ echo $PATH      # 查看PATH变量的值
/home/csdn/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
purpleEndurer  @ bash ~ $ 

 

2.2 用type命令查看别名(以ls命令为例)

purpleEndurer  @ bash ~ $ type ls
ls is aliased to `ls --color=auto'
purpleEndurer  @ bash ~ $ type -t ls
alias
purpleEndurer  @ bash ~ $ type -p ls
purpleEndurer  @ bash ~ $ type -a ls
ls is aliased to `ls --color=auto'
ls is /usr/bin/ls
ls is /bin/ls
purpleEndurer  @ bash ~ $ 

 如果我们想执行真正的那个命令而非别名,除了用

Linux shell编程学习笔记31:alias 和 unalias 操作 命令别名icon-default.png?t=N7T8https://blog.csdn.net/Purpleendurer/article/details/134642886?spm=1001.2014.3001.5501

中的介绍的方法,还可以用type命令来判断。

2.3 用type命令同时查看shell内置命令和别名(以echo和ls命令为例)

purpleEndurer  @ bash ~ $ type echo ls
echo is a shell builtin
ls is aliased to `ls --color=auto'

purpleEndurer  @ bash ~ $ type -t echo ls
builtin
alias
purpleEndurer  @ bash ~ $ type -p echo ls
purpleEndurer  @ bash ~ $ type -a echo ls
echo is a shell builtin
echo is /usr/bin/echo
echo is /bin/echo
ls is aliased to `ls --color=auto'
ls is /usr/bin/ls
ls is /bin/ls

purpleEndurer  @ bash ~ $

 

2.4 用type命令查看外部命令(以tty命令为例)

purpleEndurer  @ bash ~ $ type tty
tty is /usr/bin/tty
purpleEndurer  @ bash ~ $ type -p tty
/usr/bin/tty
purpleEndurer  @ bash ~ $ type -P tty
/usr/bin/tty
purpleEndurer  @ bash ~ $ type -t tty
file
purpleEndurer  @ bash ~ $ type -a tty
tty is /usr/bin/tty
tty is /bin/tty
purpleEndurer  @ bash ~ $ type -ap tty
/usr/bin/tty
/bin/tty
purpleEndurer  @ bash ~ $ type -apt tty
file
file
purpleEndurer  @ bash ~ $ 

2.4 用type命令查看内部命令、别名和外部命令(以echo、ls和tty命令为例)

purpleEndurer  @ bash ~ $ type echo ls tty
echo is a shell builtin
ls is aliased to `ls --color=auto'
tty is /usr/bin/tty
purpleEndurer  @ bash ~ $ type -apt echo ls tty
builtin
file
file
alias
file
file
file
file
purpleEndurer  @ bash ~ $ type -a echo ls tty
echo is a shell builtin
echo is /usr/bin/echo
echo is /bin/echo
ls is aliased to `ls --color=auto'
ls is /usr/bin/ls
ls is /bin/ls
tty is /usr/bin/tty
tty is /bin/tty
purpleEndurer  @ bash ~ $ type -at echo ls tty
builtin
file
file
alias
file
file
file
file
purpleEndurer  @ bash ~ $ type -t echo ls tty
builtin
alias
file
purpleEndurer  @ bash ~ $ type -p echo ls tty
/usr/bin/tty
purpleEndurer  @ bash ~ $ 

2.5 用type 命令查看函数

我们先定义一个函数:

function a()
{echo hello;
}

然后用type命令来查看:

purpleEndurer @ bash ~ $ function a(){ echo hello; }
purpleEndurer @ bash ~ $ type a
a is a function
a () 

    echo hello
}
purpleEndurer @ bash ~ $ type -a a
a is a function
a () 

    echo hello
}
purpleEndurer @ bash ~ $ type -f a
bash: type: a: not found
purpleEndurer @ bash ~ $ type -t a
function
purpleEndurer @ bash ~ $ type -p a
purpleEndurer @ bash ~ $ type -P a
purpleEndurer @ bash ~ $  

可见,-p和-P选项对函数没有作用。

2.6 如果我们用内置命令或别名作为自定义函数名,type命令会如何显示?

我们先定义一个函数:

function ls()
{echo hello;
}

然后用type命令来查看:

purpleEndurer @ bash ~ $ function ls(){ echo hello; }
purpleEndurer @ bash ~ $ ls
hello
purpleEndurer @ bash ~ $ type ls
ls is aliased to `ls --color=auto'
purpleEndurer @ bash ~ $ type -a ls 
ls is aliased to `ls --color=auto'
ls is a function
ls () 

    echo hello
}
ls is /usr/bin/ls
ls is /bin/ls
purpleEndurer @ bash ~ $ type -t ls 
alias
purpleEndurer @ bash ~ $ type -p ls 
purpleEndurer @ bash ~ $ 

从上面的命令执行情况来看:

  • 就执行优先级而言,函数优先于内置命令。
  • 不加任何选项的话,type命令 不对函数进行处理。
  • 使用 -a 选项,type命令 才对函数进行处理。
http://www.hkea.cn/news/316713/

相关文章:

  • 网站制作软件名字线做竞价推广代运营公司
  • avada如何做中英文网站沈阳百度推广排名优化
  • 做网站品长沙网络营销公司排名
  • b2b商贸网站环球网最新消息疫情
  • wordpress next主题什么是seo教程
  • 如何规划一个网站快手秒赞秒评网站推广
  • 中国网站开发网站seo需要用到哪些工具
  • 织梦做的网站首页出现空白网页平台做个业务推广
  • 备案做电影网站吗yandx引擎入口
  • 网站双倍浮动百度账号登陆入口
  • 聊城市网站建设网站推广排名
  • 帝国新闻网站模板百度seo推广怎么做
  • 预约做港澳证的网站网站排名在线优化工具
  • 罗湖实惠的网站建设费用成都官网seo厂家
  • 建设部官方网站有哪些优帮云排名优化
  • 天津做网站找谁新东方在线教育平台官网
  • 南宁做网站在哪了日本预测比分
  • 咋样查看网站用什么编程语言做的9个广州seo推广神技
  • 网站链接太多怎么做网站地图谷歌广告
  • 网站关键词更新临汾网络推广
  • 个人做网站靠什么盈利免费网站建设模板
  • 网站开发 打标签aso优化怎么做
  • 教育校园网站建设方案seo每天一贴
  • 怎么看网站的建设时间推广公司品牌
  • 营销型网站有什么特点英语培训机构
  • 学院网站的系统建设方式宝鸡网站seo
  • 网站客户端怎么做的百度一下了你就知道官网
  • 有什么推广方法优化大师电脑版官方
  • 自己做网站的服务器上海网站建设公司排名
  • 跳蛋塞逼做多的视频网站百度广告联盟官网