Passion/bash 22

tmux in rc.local

rc.local 을 활용하여 시작 스크립트를 실행할 수 있다. 그 중에서 tmux session을 열고 명령어를 실행하는 방법 /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. /root/start_kube.sh exit 0 /root/start_kube.sh 스크립트 #!/bin/sh # starting new tmux session with name 'kube' including one window called '..

Passion/bash 2020.03.02

builtin set

bash 스크립트에서 set 명령어 뒤에 오는 다양한 옵션들이 존재한다. setset [--abefhkmnptuvxBCEHPT] [-o option-name] [argument …] set [+abefhkmnptuvxBCEHPT] [+o option-name] [argument …] 예를 들어 set -x 를 하면 Print a trace of simple commands, for commands, case commands, select commands, and arithmetic for commands and their arguments or associated word lists after they are expanded and before they are executed. The value of t..

Passion/bash 2017.01.03