Skip to content

Tag: shell

exporting list of variables in docker run

We have a set of variables in env file as given below examples.env Now, docker run cannot substitute $B for /path/path1, due to its limitations So, I want to export the variable in launcher script and then call those variable using -e flag, as given below mydocker.sh Now how to create docker command to get al…

Show colored output in terminal when using the sh command

color.sh When typing $ ./color.sh the terminal outputs in the respective colors. However, when I type $ sh color.sh it does not output in the correct colors. Instead it gives me the output below. Is there any way to make $ sh color.sh print in the respective colors? Thanks. Answer Use this codes But better us…

How to execute command line via input

I’ve read this and this, but didn’t make it work. Here’s my script: and it output things like: Now I’d juste like to execute it in the same line, but xargs makes all incoming into one line of arguments (and it doesn’t run it). xargs -0 doesn’t work either. And I’d lik…