source:
benchmark/fixcsv.sh@
ebadb5d
      
      | Last change on this file since ebadb5d was f15fe0a, checked in by , 7 years ago | |
|---|---|
            
  | 
        |
| File size: 193 bytes | |
| Line | |
|---|---|
| 1 | #!/bin/bash | 
| 2 | |
| 3 | CSV=$1 | 
| 4 | tmpfile=$(mktemp) | 
| 5 | function finish { | 
| 6 | rm -rf "$tmpfile" | 
| 7 | } | 
| 8 | trap finish EXIT | 
| 9 | |
| 10 | mv $CSV $tmpfile | 
| 11 | cat $tmpfile | tr "\n" "\t" | sed -r 's/\t,/,/g;s/,\t/,/g' | tr "\t" "\n" > $CSV | 
  Note:
 See   TracBrowser
 for help on using the repository browser.