Hello I'm trying to merge a group of commands in a single line using semicolon ;

pkill screen ; screen ; cd directory ; sudo xx

So basically what I'm trying to do is to kill all open screens then open a new screen and go to a directory and execute a command.

Whenever I try to execute the above-mentioned command it stops at the welcome screen of screen that says press space to continue and the sequence isn't executed..

Is there a way around this?

pkill screen ; screen bash -c 'cd directory ; sudo xx'

See: GNU screen in startup screen: multiple commands

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.