Hacker News new | past | comments | ask | show | jobs | submit login

Couldn't play it on my system (flash, html video issues), but one can manage :

    # segments
    $ for url in $(curl -sL http://b5vod-vh.akamaihd.net/i/m/NjIzMjk0Ng/xVc_Rg1fNn9bndgr_M6.GD7_Lk.3w3FeiCzVWzGcJJY1MDBh/3c45758f-6a07-47a2-8cbc-70d98b3e0bbc_,44,15,24,70,120,180,240,0.mp4.csmil/index_0_av.m3u8 | egrep '^http') ; do wget ${url} ; done
    # reassembly
    $ for segment in $(ls -1rt) ; do cat ${segment} >> complete.ts ; done
    # joy
    $ mpv complete.ts

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).

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