{"id":1034,"date":"2022-06-08T10:55:44","date_gmt":"2022-06-08T09:55:44","guid":{"rendered":"https:\/\/mokrzycki.eu\/blog\/?p=1034"},"modified":"2022-06-08T10:58:15","modified_gmt":"2022-06-08T09:58:15","slug":"google-play-billing-reports-modify-csv-to-display-only-specific-columns","status":"publish","type":"post","link":"https:\/\/mokrzycki.eu\/blog\/2022\/06\/08\/google-play-billing-reports-modify-csv-to-display-only-specific-columns\/","title":{"rendered":"Google Play Billing Reports &#8211; modify csv to display only specific columns"},"content":{"rendered":"\n<p>To avoid having to do manual modifications to the csv file, we can use a script ready for this.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<pre class=\"wp-block-code\"><code>cat PlayApps_202205.csv| csvcut \",\" 1 2 4 6 7 14 15 16 17 18 &gt; GooglePlay.csv<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>To use it &#8211; first we need to download the script from <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/Zigazou\/csvcut\" target=\"_blank\">Zigazou&#8217;s GitHub<\/a> and build it (follow the instruction).<\/p>\n\n\n\n<p>Once we builded the script. we can move the file to<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin<\/code><\/pre>\n\n\n\n<p>so it will be available to use globally.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Let&#8217;s assume it&#8217;s done. Now we can work with our csv. <\/p>\n\n\n\n<p>Here is my use case: I want to select specific columns in csv and save them as an output to the another file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat PlayApps_202205.csv| csvcut \",\" 1 2 4 6 7 14 15 16 17 18 &gt; GooglePlay.csv<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To avoid having to do manual modifications to the csv file, we can use a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1035,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[502],"tags":[848,847,417,232,211,105,233],"_links":{"self":[{"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/posts\/1034"}],"collection":[{"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/comments?post=1034"}],"version-history":[{"count":3,"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/posts\/1034\/revisions"}],"predecessor-version":[{"id":1038,"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/posts\/1034\/revisions\/1038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/media\/1035"}],"wp:attachment":[{"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/media?parent=1034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/categories?post=1034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mokrzycki.eu\/blog\/wp-json\/wp\/v2\/tags?post=1034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}