sh Bash的代码片段

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Bash的代码片段相关的知识,希望对你有一定的参考价值。

# bash 遍历文件
if [[ -d "/etc/zsh.d" ]]; then
  for f in /etc/zsh.d/*.zsh(N); do
    source $f
  done
fi
# The (N) tells zsh to set the NULL_GLOB option for that pattern. When no 
# matches are found, the glob expands to an empty string instead of throwing an 
# error. In zsh a for loop over an empty expansion does nothing, which is the 
# behavior we want here.

以上是关于sh Bash的代码片段的主要内容,如果未能解决你的问题,请参考以下文章

sh bash片段

sh Git片段#tags:bash

sh Bash片段

sh bash片段 - 这些片段大多只是我自己的笔记;我找到了一些,有些我已经找到了

玩转Bash变量

玩转Bash变量