Created
April 11, 2014 16:54
-
-
Save yuitest/10483978 to your computer and use it in GitHub Desktop.
引数を標準入出力につなぎ替えて、残りの引数を実行するシェルスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec < $1 | |
shift | |
exec >> $1 | |
shift | |
exec $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hoge arg1 arg2 ... < foo.txt >> bar.txt
は
/path/to/stdiocontrol.sh foo.txt bar.txt hoge arg1 arg2 ...
と等しい。