Created
February 1, 2020 22:17
-
-
Save shitpoet/83d16e173a3658bd33b6e2e33e48ed5c to your computer and use it in GitHub Desktop.
execute cs script from stdin using cs-script (cscs)
This file contains 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/bash | |
# echo "using System; class App { public static void Main() { Console.WriteLine(1 + 1); } }" | cscsi.sh | |
# cat hello.cs | cscsi.sh | |
tmpfile=$(mktemp -p /dev/shm XXXXXXXXXXXXX.cs) | |
trap "rm -f '$tmpfile'" exit int term | |
cat > $tmpfile | |
cscs -ac $tmpfile | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment