Tag Info

New answers tagged

2

The mysql command is the thing that actually generates the output, so redirect its standard output (stdout).  Change the second line to mysql -uUSER -p'PASSWORD' >> myfile.csv << EndOfFile using >> to append to myfile.csv, if it already exists.


1

in perl regexp (grep -P ...) you may use \Q...\E to protect meta chars grep -P "(^|,)\Q$EMAIL\E(,|$)" file.csv where: (^|,) = start of field (,|$) = end of field


3

For any fixed ordering per call (a, b, c, d, in your example) you can use for example an awk program like this to accomplish the task: awk -v order=',a,b,c,d' ' BEGIN { OFS = FS = "\t" n = split(order,ord,",") for (i=1; i<=n; i++) ind[ord[i]] = i } FNR==1 { for (i=2; i<=n; i++) prm[ind[$i]] = i } { out[$1] = sprintf("%s", $1) ...


1

You are missing FilterOptions. I think the correct command is: unoconv -i FilterOptions=09,,system,1 -f xls original.csv



Top 50 recent answers are included