5c7844da3c6369c64e12a7fa949702f59ebcd64b
compute/data-munging.md
| ... | ... | @@ -3,6 +3,9 @@ |
| 3 | 3 | ### Sum a list of numbers |
| 4 | 4 | `cat list | paste -s -d+ | bc` |
| 5 | 5 | |
| 6 | +### Make sure a file has a trailing newline |
|
| 7 | +`tail -c1 file | read -r _ || echo >> file` |
|
| 8 | + |
|
| 6 | 9 | ### Double-space a file |
| 7 | 10 | `sed -G` |
| 8 | 11 |