You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
他の言語をを書き慣れてから、シェルスクリプトを書こうとするとしょうもない部分でハマったりすることがあります。「簡単な処理だからシェルスクリプトで書くか」と思っても無駄に時間がかかってしまっては仕方ないですよね。 今回は初めてシェルスクリプトを書くときに、ハマりそうな点について説明をしたいと思います。 実行権限をつける 単純にファイルを生成しても下記の用に実行しようとしても実行はできません。 # touch test # ./test sh: ./test: Permission denied # touch foo # ./foo sh: ./foo: Permission denied これはファイルに実行権限がついていないため、起きる現象です。 chmodコマンドを使って実行権限をつけてやりましょう。 # chmod +x test # ./test # chmod +x foo #
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く