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

You know, the whole point of cat is that you don't need to use it in a loop. It concatenates files. It wasn't named after a small furry mammal.


Can you explain a little more ?


You can just do this:

  cat $(ls -1rt) > complete.ts


Aight, I thought he meant globbing, I was worried about order. Point taken.


Well, he probably did mean globbing.

I suspect glob collation is the same as the collation that `ls` uses for any given locale, so... :-)


And AFAIK, globbing can't be told to order by time, thus producing an interesting director's cut of the original video (I actually tried).




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: