unix - Combine multiple scripts in an "index.html" like fashion? -
is there standard way in unixesque (sh/bash/zsh) system execute group of scripts if group of scripts 1 script? (think index.html). point avoid additional helper scripts find , keep small programs self sufficient , easier maintain.
say have 2 (in bold) ruby scripts.
/bin
/bin/foo_master
/bin/foo_master/main
/bin/foo_master/helper.rb
so when execute foo_master
seo@macbook ~ $foo_master
[/bin/foo_master/main]: make new friends, keep old.
[/bin/foo_master/helper.rb]: 1 silver , other gold.
if you're trying without creating helper script, typical way execute both (note: i'll use : $;
represent shell prompt):
: $; ./main; ./helper.rb
now, if you're trying capture output of both file, say, can group these subshell, parenthesis, , capture output of subshell if single command, so:
: $; (./main; ./helper.rb) > index.html
is you're after? i'm little unclear on final goal is. if want make heavily repeatable thing, 1 want create wrapper command... if want run 2 commands one, can 1 of above 2 options, , should work cases. (feel free expand question, though, if i'm missing you're after.)
Comments
Post a Comment