Hi all,
I want to set 10 set of strings into a variable where:
- removing all spaces within each string
- change the delimiter from "|" to ","
Currently, I've the below script like this:
Table=`ten character strings with spaces in-between and each string with delimiter "|" | tr -d ' ' | awk -F'|' '{print $1","$2","$3","$4","$5","$6","$7","$8","$9","$10}'`
Today I've got an error 0403-029 There is not enough memory available now.
while running the tr -d ' '
(delete space characters) so I suspect either I've used too many pipelines or the tr command (translate or delete) itself may eat up the memory.
I'd like to know if there is a way to remove all spaces within each string within the command:
awk -F'|' '{print $1","$2","$3","$4","$5","$6","$7","$8","$9","$10}'`
So as to use less pipeline commands thus reduce the memory consumption
Thanks in advance
Paul