Hacker News new | past | comments | ask | show | jobs | submit | gcmalloc's comments login

useless use of cat

    pv < "$1" > "$2"


Even if the cat at the beginning of a pipe isn't strictly necessary, it still helps readability to have everything flowing from left to right.


I also advocate this "useless" use of cat, but you can write the redirection before the command:

    <"$1" pv >"$2"


The bigger problem is that using cat destroys the file size information.


pv reads content from a file by default, so that can actually be reduced further to:

    pv "$1" > "$2"


Which will actually give better results this way, since it'll read the size of the file and use that to provide an estimate even.


Adding my two cent:

    twistd web --path . --port 8080


You could try to partially reuse: https://github.com/github/gitignore Which try to be a gitignore database.


Yep, that's where I got the core of the templates. They don't accept all .gitignore templates though unless you provide

> Up-to-date, canonical documentation that mentions the files to be ignored

As @mschuster91 suggested, I need a way to accept submissions that aren't in the github/gitignore database.


50 -> 99


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

Search: