Skip to main content
8 events
when toggle format what by license comment
Feb 28, 2019 at 21:25 history edited Crypteya CC BY-SA 4.0
deleted 37 characters in body
Feb 28, 2019 at 3:10 comment added Crypteya A major benefit of scripting however is that it doesn't need to be re-created each time so the long one-liner may not be necessary after it has been created.
Feb 28, 2019 at 3:04 comment added Crypteya You can close the terminal by using the exit command at the end of the script. You should be able to run the script fine like that. Make sure that at the end you do something like sh ./script or sh /full/path/to/script. You need to put the path to the script in your final command. Simply doing 'sh script' won't work.
Feb 28, 2019 at 1:47 comment added GoodGuy Thank you for the answer. Actually the goal is to close the terminal after execute the commands. Can I also cretae a script and run it, like --- touch script && printf \"A && B && C\" > script && sh script --- ?
Feb 28, 2019 at 1:42 comment added Crypteya @GoodGuy, you shouldn't close the terminal until you have run both A & and B & manually. I've updated my answer to have some additional info about shell scripts.
Feb 28, 2019 at 1:39 history edited Crypteya CC BY-SA 4.0
added 229 characters in body
Feb 28, 2019 at 1:38 comment added GoodGuy Unfortunally it only affects the currently running command, so when A runs, B doesn't start when terminal is closed. <command1 && command2> & returns syntax error
Feb 28, 2019 at 1:32 history answered Crypteya CC BY-SA 4.0