emulate sh

简介:
PostgreSQL的configure 脚本中有如下代码:

复制代码
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in  *posix*) set -o posix ;;
  esac

fi
复制代码
之前已经验证过,如果系统当前shell为 zsh, 则执行 emulate sh 命令。

那么 emulate sh 到底是干什么的呢?可以参见下列的解释:

http://www.acm.uiuc.edu/workshops/zsh/emulation.html

Zsh can emulate sh, ksh, or csh. (csh is not fully emulated). zsh does an outstanding job in its sh and ksh emulation.

You can start emulating another shell by running emulate some_shell from the command line. If you add the -R flag, all options will be reset to their default values.

You can also create a link called 'csh', or 'ksh', or 'sh' that points to zsh. Zsh will notice that it was invoked with a different name, and do its best to behave like the shell you specify.








本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/07/19/2598846.html,如需转载请自行联系原作者
目录
相关文章
(node)Warning: Accessing non-existent property ‘xxx‘ of module exports inside circular depen
(node)Warning: Accessing non-existent property ‘xxx‘ of module exports inside circular depen
|
Linux 定位技术 数据安全/隐私保护
【Calculate】Calculate Linux安装操作记录
【Calculate】Calculate Linux安装操作记录
153 0
9:32 Emulator: emulator: ERROR: Unknown AVD name [Nexus_5X_API_28], use -list-avds to see valid list
9:32 Emulator: emulator: ERROR: Unknown AVD name [Nexus_5X_API_28], use -list-avds to see valid list. 9:32 Emulator: Process finished with exit code 1
159 1
9:32 Emulator: emulator: ERROR: Unknown AVD name [Nexus_5X_API_28], use -list-avds to see valid list
ionic4 pipe.ts is part of the declarations of 2 modules:
ionic4 pipe.ts is part of the declarations of 2 modules:
162 0
ionic4 pipe.ts is part of the declarations of 2 modules:
|
Android开发
storage/emulated/0路径下的File.listFiles返回值为null
storage/emulated/0路径下的File.listFiles返回值为null
655 0
storage/emulated/0路径下的File.listFiles返回值为null
|
移动开发 iOS开发
Could not find iPhone 6 simulator
Could not find iPhone 6 simulator
129 0
|
关系型数据库 存储 SQL
|
关系型数据库 存储 SQL