I want to remove extra spaces from variable in aix script.
We retrieve the data from oracle database and then print the values. We have a value on 90th position.
When we execute the query on sqlplus it shows the length of 90th position as 3, but when we use the same query in aix script it shows the length as 158. Kindly advice how can we remove the extra spaces.
I tried as
parm=` $90 | tr -d ''`
parmlen=length(parm)
but on execution the script received below error:
Syntax Error The source line is 7.
The error context is
>>> parm=` <<<
awk: 0602-502 The statement cannot be correctly parsed. The source line is 7.