Skip to content

Instantly share code, notes, and snippets.

@axjack
Created June 23, 2020 13:41
Show Gist options
  • Save axjack/9b9ca5cd63dd20bd3905d440d3f8737c to your computer and use it in GitHub Desktop.
Save axjack/9b9ca5cd63dd20bd3905d440d3f8737c to your computer and use it in GitHub Desktop.
C++のexecファイルにinput.txtを喰わして実行する用のシェルスクリプト
#!/bin/bash
if [ $# -lt 1 ];then
echo "#USAGE:"
echo "./test.sh cpp_exec_file [input.txt]"
exit 0
fi
input_file="input.txt"
if [ $# -eq 2 ]; then
input_file=./$2
fi
echo ----------
echo "#head ${input_file}"
head ./${input_file}
echo ----------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment