i am running a bash script as below:I only get minicom to run and show in pane 0 and pane 1. The rest of the panes show something like this:
In Pane 2:
root@mymachine:/home/abc/tmp# m inicom -b 9600 -D /dev/tty2
In Pane 3
(tty3), 4 (tty4),5 (tty5) all show as follow, except the device name changed accordingly.No minicom window is opened, as if i typed the command "minicom -b 9600 -D /dev/tty3 " into terminal but nothing happen.. I tried to put sleep 1 inside the for loop, it doesn't help either. If i manually to the same pane and run the same command, minicom pops up and run okroot@mymachine:/home/abc/tmp# minicom -b 9600 -D /dev/tty3 root@mymachine:/home/abc/tmp#```DEVICES=("/dev/tty0" "/dev/tty1" "/dev/tty2" "/dev/tty3" "/dev/tty4" "/dev/tty5")SESSION_NAME="minicom_session"tmux new-session -d -s $SESSION_NAME# Split the window into 6 panes (2 rows, 3 columns)tmux split-window -htmux split-window -htmux select-pane -t 0tmux split-window -vtmux select-pane -t 2tmux split-window -vtmux select-pane -t 4tmux split-window -vsleep 1# Run minicom in each panefor i in ${!DEVICES[@]}; do tmux send-keys -t ${SESSION_NAME}:0.${i} "minicom -b $BAUD_RATE -D ${DEVICES[$i]}" C-mdonetmux select-layout tiled# Attach to the tmux sessiontmux attach-session -t $SESSION_NAME
Here are my scripts:I tried to insert sleep into the for loop, but it doesn't help either
DEVICES=("/dev/tty0" "/dev/tty1" "/dev/tty2" "/dev/tty3" "/dev/tty4" "/dev/tty5")SESSION_NAME="minicom_session"tmux new-session -d -s $SESSION_NAME# Split the window into 6 panes (2 rows, 3 columns)tmux split-window -htmux split-window -htmux select-pane -t 0tmux split-window -vtmux select-pane -t 2tmux split-window -vtmux select-pane -t 4tmux split-window -vsleep 1# Run minicom in each panefor i in ${!DEVICES[@]}; do tmux send-keys -t ${SESSION_NAME}:0.${i} "minicom -b $BAUD_RATE -D ${DEVICES[$i]}" C-m#sleep 1donetmux select-layout tiled# Attach to the tmux sessiontmux attach-session -t $SESSION_NAME