Created
October 3, 2017 15:02
-
-
Save scwood/f0ed962c7c4b0b82eaa74efa07881476 to your computer and use it in GitHub Desktop.
Append output to column of file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| touch output.csv # file with the end result | |
| for i in {1..10}; do # replace with your "for every file loop" | |
| sh ./program.sh | tr ' ' '\n' > tempfile1 # program.sh is your software, we pipe it into tr to split it into a column | |
| paste -d ',' tempfile1 output.csv > tempfile2 # paste the column with a delimeter to a tempfile | |
| mv tempfile2 output.csv # clean up the tempfiles on every iteration | |
| rm tempfile1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment