Ubuntu Pastebin

Paste from ben at Mon, 20 Feb 2017 23:35:18 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#!/bin/bash

for file in $(find . -type f '*')
    do
        i=0 row=()
        while read -r line
	    do
            [[ $line ]] && ((i++ < 15)) && line=${line#*:} row+=("\"${line# }\"")
        done < "$file"
        ( IFS=,; echo "${row[*]}" )
    done > /home/ben/Desktop/output.csv
Download as text