diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-01-12 15:50:59 +0100 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-01-12 15:50:59 +0100 |
commit | 277d6495d0b0333b1ce1aa8e77919982522f0a19 (patch) | |
tree | 9cf9726fce830fdb86d7618d8b609cad289c71c4 | |
parent | 7d327eba8f0a8a167424b960960c28fac2b065db (diff) |
Add some stuff useful in scripting
-rw-r--r-- | bash.md | 4 | ||||
-rw-r--r-- | ssh.md | 8 | ||||
-rw-r--r-- | tmux.md | 5 |
3 files changed, 17 insertions, 0 deletions
@@ -21,3 +21,7 @@ Remove longest from start Loop over files for file in glob/*; do something $file; done + +## Conditionals + +* `-z`: is empty string @@ -7,3 +7,11 @@ Change password for key: ssh-keygen -p <keyname> + +## Setup login with public key + + ssh-copy-id [user@]host + +## Execute commands and start shell + + ssh -t host 'commands; bash' @@ -12,3 +12,8 @@ ## Pane management q display pane indices + +## Run command in new session + + tmux new-session \; send-keys 'command
' + #
can be entered with Ctrl-V + Enter |