Ubuntu Pastebin

Paste from ben at Mon, 20 Feb 2017 23:56:02 +0000

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

shopt -s globstar

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