Bash like command piping and redirecting for Dart to make writing Dart scripts easier.
Say good-bye to bash, python and batch file scripting! Invest in a sound language with amazing analyzer tools!
From the authors of Jaguar.dart.
awaitexec('rm', ['example/dest.csv']).run();finalString out =awaitexec('cat', ['example/names.csv']).runGetOutput();
print(out);or
awaitexec('cat', ['example/names.csv']).runGetOutput(onFinish: print);awaitexec('cat', ['example/names.csv'])
.pipe(exec('cut', ['-d', "','", '-f', '1']))
.runGetOutput(onFinish: print);await (exec('cat', ['example/names.csv']) |exec('cut', ['-d', "','", '-f', '1']) >newUri(path:'example/dest.csv'))
.run();await (exec('cut', ['-d', "','", '-f', '1']) <'''John,Smith,34,LondonArthur,Evans,21,NewportGeorge,Jones,32,Truro ''')
.runGetOutput(onFinish: print);awaitexec('cat', ['example/names.csv'])
.pipeInlineLine(
(Stream<String> stream) => stream.map((s) => s.split(',')[1]))
.runGetOutput(onFinish: print);- Catch and report error in sub-commands
- Support other encoders
- Support stderr redirection
- Test multiple redirections
- Support
&,|and~concepts