I have a text file with each record having a data value and I have to generate a text file that should have each of the original records and new records with data value sign changed. Input file with records look like this (pipe is the delimiter, data value is always the 5th field):
abc|xyz|a|ab_1|100
abs|pqr|d|ab3|-200
The output should be:
abc|xyz|a|ab_1|100
abc|xyz|a|ab_1|-100
abs|pqr|d|ab3|-200
abs|pqr|d|ab3|+200