タグ

bashに関するhengsuのブックマーク (2)

  • Advanced Bash-Scripting Guide

    This tutorial assumes no previous knowledge of scripting or programming, yet progresses rapidly toward an intermediate/advanced level of instruction . . . all the while sneaking in little nuggets of UNIX® wisdom and lore. It serves as a textbook, a manual for self-study, and as a reference and source of knowledge on shell scripting techniques. The exercises and heavily-commented examples invite ac

  • shell のちょっとしたテクニック - odz buffer

    後輩が cat README | tr ' ' '\n' | sort | uniq -c | sort -nr | head てなテクニックを見て、びっくりしたみたいな話をしていたのだが、こういうパイプラインを利用するテクニックを学んでいないのは色々損な気がする。 ていうか、サーバで丸一日以上かかるような処理を実行するのもしょっちゅうなのに、GNU screen も nohup も知らないってのはいろいろ支障があるような気もするのだが、だれも教えないものかなぁ。 ということで、bash or zsh のちょっとしたテクニックとか*1。リダイレクトとかパイプラインは略。 連続実行 単純に連続実行。 % foo; barfoo が正常終了したときだけ bar を実行 % foo && barfoo が正常終了しなかったときだけ bar を実行 % foo || bar&&、||は来は論理演

    shell のちょっとしたテクニック - odz buffer
  • 1