2
在Bash中参数化对应用程序的链接调用
我在Bash shell中使用了一个黑匣子UNIX程序,该程序从stdin读取数据列,对其进行处理(应用平滑效果),然后输出到stdout。我通过UNIX管道使用它,例如 generate | smooth | plot 为了更加平滑,我可以重复进行平滑操作,因此可以从Bash命令行中调用它,如下所示: generate | smooth | smooth | plot 甚至 generate | smooth | smooth | smooth | smooth | smooth | smooth | smooth | smooth | smooth | smooth | plot 这变得越来越古怪。我想制作一个Bash包装器,使其能够通过管道传递smooth并将其输出直接反馈到smooth任意次数的新实例中,例如 generate | newsmooth 5 | plot 代替 generate | smooth …
12
bash
shell-script
pipe