Reputation: 5522
How can i compile the contents of the clipboard, i tried piping the contents pbpaste | gcc
but it did not work it gave the error i686-apple-darwin11-llvm-gcc-4.2: no input files I have heard that i can use temporary file with the command mktemp
but I could not get it to work.
Upvotes: 0
Views: 175
Reputation: 158629
Using -xc -
will allow you to process stdin
:
gcc -xc -
You can see a live example here.
Upvotes: 2