Answer the question
In order to leave comments, you need to log in
How to pass two or more commands in sequence in iTerm / zsh?
Greetings.
There is iTerm. It has a setting for launching a command when creating a profile:
Is it possible to enter two or more commands in this field so that the second one is launched after the first one is executed, and so on? What options are there?
Needed to quickly connect via SSH > go to the desired folder > run the file...
Answer the question
In order to leave comments, you need to log in
Option for working with ssh (connect, change to directory, start bash):
If you only need to execute commands on the server:
Several consecutive commands, while the second command will be executed only if the first one succeeds:
Several consecutive commands that will be executed without success check previous command:
ssh -t [email protected] "cd /home/user/ && bash -l"
ssh [email protected] "date && hostname"
date && hostname
date; hostname
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question