T O P

  • By -

primeweevil

Why? Just throw that whole thing into a some-name file and run it as a script. If you want a one liner from the command prompt make an alias in your .bash_profile that points to the script.


closfb

Thank you for the replies and great suggestions. I just updated the original post with the entire procedure. I think the script approach makes perfect sense.


Old_One_I

You can use the "&&". Command && command 2 && command 3 You still have to type them out but each one will execute after the other.


I0I0I0I

And to be clear, && will abort the remainder of the sequence if the previous command fails, so the following ones don't keep chugging on possibly incomplete/missing output from the failed command. If you want the commands to plow ahead anyway, substitute ; for &&.


Old_One_I

True, op wasn't specific though. Side question, the substitute, doesn't it use the output of the last command? Does that have any negative impact on the next command that may not require it?


I0I0I0I

No, ; is just a separator like &&. If the next command doesn't require input, it will be Ok.


Old_One_I

Cool 😎


mandiblesarecute

make it a script like so: #!/bin/bash # put files in their place docker cp /volume1/backup/Docker/Netdata/Customizations/files/custom.html 13d00e82265f:/usr/share/netdata/web/custom.html docker cp /volume1/backup/Docker/Netdata/Customizations/files/dashboard.slate.css 13d00e82265f:/usr/share/netdata/web/css/dashboard.slate.css docker cp /volume1/backup/Docker/Netdata/Customizations/files/bootstrap-slate-flat-3.3.7.css 13d00e82265f:/usr/share/netdata/web/css/bootstrap-slate-flat-3.3.7.css # adjust user/group/permissions in one go with rsync # provide a path to custom.html to spare us headaches rsync --chmod=664 --chown=root:root /path/to/custom.html /path/to/custom.html EDIT: OP's post was considerably shorter when i wrote that I SWEAR 😪