4 ms·
echo abc > file 1. cat file 2. cat < file 3. echo abc|cat 4. echo abc|cat - file cat can take input from the left, the right, or both same goes for cut
by uselessuseof 14y ago
echo abc > file
1. cat file
2. cat < file
3. echo abc|cat
4. echo abc|cat - file
cat can take input from the left, the right, or both
same goes for cut
- akkartik 14y agoI'm not sure what you're suggesting. I'm supposed to echo |cut ...? But I have a whole file, not just one line. So I have to cat ... |cut ... -- which is what I did. So what's your point? I could keep the file first by saying: $ < combo_not.txt cut -c7-40 |sort |dups |wc -l To which I reply, "Yuck!" Perhaps we should stop here. You seem to have made this account just a few hours ago for the express purpose of poking at people's code fragments in this thread. You're making stylistic nitpicks (they don't affect correctness, do they?) and you're making them in a tone that I'm not sure I would take from Randal Schwartz himself (you actually edited http://news.ycombinator.com/item?id=4076556 http://news.ycombinator.com/item?id=4076556 to be ruder than the original). It's a drag, man.
- uselessuseof 14y agocut takes a file as an argument. there's no need to start the line with < cut -c4-70 combo_not.txt|...
- akkartik 14y agoBut that's where this conversation started out. My response the last time around: http://news.ycombinator.com/item?id=4076674 http://news.ycombinator.com/item?id=4076674 BTW, HN has some formatting support: http://news.ycombinator.com/formatdoc http://news.ycombinator.com/formatdoc