Re: using sed to add text to csv file
Joel Hammer <[email protected]>
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <1336175672.1984.4.camel@hammer11> |
This works for me. (I cheated and used vim and sed to create this script. It took about 5 minutes.) #!/bin/bash sed -n " /^First/b s/^/firstname=/ s/,/\&lastname=/ s/,/\&address=/ s/,/\&city=/ s/,/\&st=/ s/,/\&zip=/ s/,/\&email=/ s/,/\&phone=/ s/,/\&dob=/ s/,/\&optindate=/ s/,/\&ipaddress=/ s/,/\&url=/ p " yourfile.csv