3 ms·
That doesn't make it much better though. Parsing the output of df (with a useless tail -1) is kind of awful when you can use something like stat -f -c %a.
by glandium 9y ago
That doesn't make it much better though. Parsing the output of df (with a useless tail -1) is kind of awful when you can use something like stat -f -c %a.
- MichaelBurge 9y agoThat has the same problem, just with a different name. So your solution solves a style complaint, not an actual functional problem.
- sslayer 9y agoI agree with your comment about it being functional. But wouldn't removing tail from the pipe remove complexity and speed up the processing(Arguably, most likely only by a small fraction)
- linsomniac 9y agoHow is the "tail -1" useless? The output of that df command is two lines, one contains the column headers and the next contains the data.
- glandium 9y agobecause `... | tail -n -1 | awk '{...}'` is the same as `... | awk 'END {...}'`.