任意のinput.txtとc.cppを用意する。
そして以下のシェルスクリプトを実行
test.sh
#!/bin/sh
g++ c.cpp -o c
cat input.txt | ./c > out.txt
out.txtが出力される。
便利!!
More than 5 years have passed since last update.
任意のinput.txtとc.cppを用意する。
そして以下のシェルスクリプトを実行
#!/bin/sh
g++ c.cpp -o c
cat input.txt | ./c > out.txt
out.txtが出力される。
便利!!
Register as a new user and use Qiita more conveniently