Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe I’m dumb, but how would you write cat or echo if you don’t have a “terrible editor”?


gcc accepts compiling code from stdin.

If not:

     >> echo.c << EOF
     #include <stdio.h>
     int main(){
     while((c = getline()) != EOF){
          putchar(c);
     }
     }
     EOF




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: