In this xkcd comic:

they mention that real programmers use cat. Well, I was asking myself: how could you program using the cat command?
$ cat > hello.c
#include <stdio.h>
main(void) {
printf("Hello, world.\n");
}
^D
$ gcc hello.c
$ ./a.out
Hello, world.
Nah, echo is clearly better:
echo 'main(){puts("Hello world\n");}' | gcc -xc -
Even if you want to use cat (felines are after all wonderful), why bother putting the source to disk? Just redirect cat's output to the compiler, as in the echo case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With