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

TIL

  $ ls
  $ cat >a.c <<EOF
  int main(){return 42;}
  EOF
  $ make a
  cc     a.c   -o a
  $ ./a; echo $?
  42
  $


I don't know about `ls`, but I typically type something so short on one line:

    $ echo 'int main(){return 42;}' > a.c; make a && ./a; echo $?




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

Search: