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,如需转载请自行联系原作者
目录
相关文章
|
12月前
|
Linux 定位技术 数据安全/隐私保护
【Calculate】Calculate Linux安装操作记录
【Calculate】Calculate Linux安装操作记录
107 0
|
存储
LeetCode 227. Basic Calculator II
实现一个基本的计算器来计算一个简单的字符串表达式的值。 字符串表达式仅包含非负整数,+, - ,*,/ 四种运算符和空格 。 整数除法仅保留整数部分。
40 0
LeetCode 227. Basic Calculator II
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
118 1
9:32 Emulator: emulator: ERROR: Unknown AVD name [Nexus_5X_API_28], use -list-avds to see valid list
|
移动开发 iOS开发
Could not find iPhone 6 simulator
Could not find iPhone 6 simulator
111 0
|
Android开发
storage/emulated/0路径下的File.listFiles返回值为null
storage/emulated/0路径下的File.listFiles返回值为null
488 0
storage/emulated/0路径下的File.listFiles返回值为null
|
XML Java Maven
how is ui5 resource root calculated
Created by Jerry Wang, last modified on Oct 22, 2015
how is ui5 resource root calculated
|
数据可视化
Paraview: Calculate Derivatives of 3-D Unstructured Dataset
关注九天学者微信公众号(扫码关注)第一时间获取技术贴更新! Paraview 是一款基于VTK的、开源的、跨平台的科学数据可视化软件,其三维显示和后处理功能非常强大。
2672 0
|
关系型数据库 存储 SQL
|
关系型数据库 存储 SQL