Skip to content

Instantly share code, notes, and snippets.

@kitsuyui
Last active July 15, 2018 08:00
Show Gist options
  • Save kitsuyui/56caec13fd00f6304be0fab7ba6b277a to your computer and use it in GitHub Desktop.
Save kitsuyui/56caec13fd00f6304be0fab7ba6b277a to your computer and use it in GitHub Desktop.
Tips: 実行中のシェルスクリプトを書きかえるときには ref: https://qiita.com/kitsuyui/items/d0048eeaa50293a92a60
$ run.sh &
$ vim run.sh
(30 秒以内に foo を bar に変えて保存する)
bar
$ run.sh &
$ cp run.sh run.sh.tmp
$ mv run.sh.tmp run.sh
$ vim run.sh
(30 秒以内に foo を bar に変えて保存する)
foo
$ cp run.sh{,.tmp}
$ mv run.sh{.tmp,}
#!/bin/sh
sleep 30
echo foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment