Last active
December 30, 2022 07:18
-
-
Save sooluh/5795570b5c0e2fb6a3b14c6428338d32 to your computer and use it in GitHub Desktop.
Create a new tmux session and run the command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change the value of the PATH variable (optional) | |
PATH="/root/.nvm/versions/node/v14.15.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" | |
tmux new-session -d -s session_name -n window_name | |
tmux send-keys -t session_name:window_name "cd /to/your/path" Enter | |
tmux send-keys -t session_name:window_name "run command here" Enter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example: