linux - Run bash script with defaults to piped commands set within the script -


two questions same thing think...

question one:

is possible have bash script run default parameters/options? ...in sense if run script:

./somescript.sh

it run ./somescript.sh | tee /tmp/build.txt?

question two:

would possible prepend script defaults? example, if run script ./somescript.sh

it run

script -q -c "./somescript.sh" /tmp/build.txt | aha > /tmp/build.html?

any or guidance appreciated.

you need wrapper script handles such scenario you.

for example, wrapper script can take parameters helps decide.

./wrapper_script.sh --input /tmp/build.txt --ouput /tmp/build.html 

by default, --input , --output can set values want when empty.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo