Tuesday, August 3, 2010

bash script測試資料夾是否存在

給未來的裕翔

這很簡單

不過我就是會忘記^^

test -d target-dir

echo $?

0表示存在

1表示不存在

No comments:

Post a Comment