Weblog entry #18 for lee
I just needed to download a lot of streaming video files from the management interface of a third party streaming service. However they didn't seem to play properly when downloaded.
Comparing a downloaded file with a copy of the file that was uploaded showed that the download stream seems to have inserted a blank line at the beginning of the file and several blank lines at the end. A quick web search gave me the following sed tricks for removing them:
mkdir filtered
for i in `ls *.rm`; do sed "1d" $i | sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' > filtered/$i ; done
Comments on this Entry
would suffice ;)
[ Parent | Reply to this comment ]