はじめに もう文字列の置換で sed コマンド使うの禁止して良いんじゃないですかね? 言いすぎだとわかってあえて言っていますが。 悪い書き方(外部コマンドに頼る方法) # 変数 line に入ってる文字列を echo コマンドで出力して sed コマンドに渡し、 # sed の s コマンドで "from" を "to" に置換して出力したものを ret 変数で受け取る ret=$(echo "$line" | sed "s/from/to/")
Published on December 14, 2020 · Updated on December 16, 2020 Bash scripts. Almost anyone needs to write one sooner or later. Almost no one says “yeah, I love writing them”. And that’s why almost everyone is putting low attention while writing them. I won’t try to make you a Bash expert (since I’m not a one either), but I will show you a minimal template that will make your scripts safer. You
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く