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.