相关疑难解决方法(0)

为什么不使用“哪个”?那用什么?

当寻找的路径,可执行文件或检查,如果你在Unix shell中输入命令的名称会发生什么,有不同的公用事业过多(whichtypecommandwhencewherewhereiswhatishash,等)。

我们经常听说which应该避免。为什么?我们应该用什么来代替?

shell history which portability

422
推荐指数
4
解决办法
7万
查看次数

为什么 shell 内置函数没有适当的手册页?

所有 shell 内置函数共享相同的手册页:

BUILTIN(1)                BSD General Commands Manual               BUILTIN(1)

NAME
     builtin, !
Run Code Online (Sandbox Code Playgroud)

等等。

然后有一小段文字描述了什么是 shell 内置函数,然后是一个看起来像这样的列表:

  Command       External    csh(1)    sh(1)
       !             No          No        Yes
       %             No          Yes       No
Run Code Online (Sandbox Code Playgroud)

但是如果我们这样做,man grep我们会得到诸如

  • 错误
  • 历史
  • 也可以看看
  • 标准
  • 描述

等等。

难道 shell 内置函数没有自己的历史、描述和参数,比如-A-r?为什么手册页中没有提供,我将如何学习正确有效地使用它们?

command-line osx freebsd man

33
推荐指数
2
解决办法
2983
查看次数

标签 统计

command-line ×1

freebsd ×1

history ×1

man ×1

osx ×1

portability ×1

shell ×1

which ×1