Hi,
I've got a fixed with data file, and I need to alter 1 field before it gets processed.
The last field has ( and ) and _ in it, and we need to take them out.
I started with
This has 2 problems (apart from been somewhat risky if it affects other fields). Firstly this altered my record length and secondly I actually want to change to size of the last field from 10 to 8
how can I get the output to be:
"word1word2word3 "
I've tried SED and AWK, but feel like my head is going to explode.
I've got a fixed with data file, and I need to alter 1 field before it gets processed.
The last field has ( and ) and _ in it, and we need to take them out.
I started with
Code:
echo "word1word2wo(r)d3_ " | tr -d '()_'
This has 2 problems (apart from been somewhat risky if it affects other fields). Firstly this altered my record length and secondly I actually want to change to size of the last field from 10 to 8
how can I get the output to be:
"word1word2word3 "
I've tried SED and AWK, but feel like my head is going to explode.