Skip to content

Instantly share code, notes, and snippets.

@ha4gu
Created April 25, 2022 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ha4gu/7a9b23173ea2cb935c86c80e3b4119e8 to your computer and use it in GitHub Desktop.
Save ha4gu/7a9b23173ea2cb935c86c80e3b4119e8 to your computer and use it in GitHub Desktop.
#!/bin/bash
# 引数で渡されるのが実行対象のファイル
target_file=$1
if [ "$(echo ${target_file} | grep '.rb$')" ]; then
cat input | ruby ${target_file} | tee output;
else
echo "WARNING: It's not a ruby file.";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment