how to edit ofx file with sed editor? Replace Copy FITID into NAME
Chris Good
chris.good at ozemail.com.au
Tue Sep 13 17:49:01 EDT 2016
> Message: 7
> Date: Mon, 12 Sep 2016 18:07:52 -0700 (PDT)
> From: LinforPros <linforpros at gmail.com>
> To: gnucash-user at gnucash.org
> Subject: how to edit ofx file with sed editor? Replace Copy FITID into
> NAME
> Message-ID: <1473728872683-4686543.post at n4.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
> Hello,
> Most people (exept me) probably know how to deal with it.
> How to process the file from a bank that produces the following OFX
fields:
>
>
> <FITID>20160801000000[-6:CST]*24.37*513**POS CRE 2151 07/29/16
> 00836463 WM SUPERCENTER Wal-Mart Super Cen <NAME>POS CRE 2151
> 07/29/16 00836463 W
>
> Gnu cash will import the file but will assign the discription from the
<NAME>
> tag which is less that informative and truncated to 32 characters by the
bank.
> I need to see more that just that.
> Is there a "sed" command that would copy whatever there is after the
> double
> ** in the FITID tag and copy it into the NAME tag?
>
> Such modified file would be better for gnucash ofx importer.
> Or am I missing something here?
>
> Any help will greatly be appreciated
>
> Lin
Hi Lin,
Are your FITID and NAME tags both on the same line or are you just viewing
your OFX file in a program (like Windows notepad) that expects lines to end
with carriage return + line feed? If using windows notepad, try Wordpad.
My OFX files, downloaded using Windows, have each tag on a separate line and
each line ends with just line feed.
If you can provide more sample data, like all the info for a transaction
(<STMTRS> to </STMTRS> ) suitably edited to hide personal details, I'll
provide an awk script for you (I prefer awk to sed for tasks like this).
Regards, Chris Good
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4817 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20160914/9a8570f6/attachment.p7s>
More information about the gnucash-user
mailing list