Friday, February 1, 2013

shellでの条件分岐

shellでのor表現
if [$hoge = "aaa" -o $fuga = "bbb"]; then
  # or
fi

shellでのand表現
if [$hoge = "aaa" -a $fuga = "bbb"]; then
  # and
fi

参考

No comments:

Post a Comment