shellscript
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| shellscript [2026/01/23 08:25] – [何もしないコマンド] nullpon | shellscript [2026/06/08 02:50] (現在) – [スクリプトのディレクトリを取得] nullpon | ||
|---|---|---|---|
| 行 244: | 行 244: | ||
| <code bash> | <code bash> | ||
| - | DIR=$(cd $(dirname $0); pwd) | + | DIR="$(cd "$(dirname |
| </ | </ | ||
| 行 372: | 行 372: | ||
| </ | </ | ||
| - | ファイルを空にする | + | 標準出力も空なので、これを利用してファイルを空にすることができる。ログファイルを即座に空にするときに便利 |
| <code bash> | <code bash> | ||
| - | : > file.txt | + | : > app.log |
| </ | </ | ||
| ===== 標準入力がパイプ/ | ===== 標準入力がパイプ/ | ||
shellscript.1769156757.txt.gz · 最終更新: by nullpon