I am writing a bash script ,and I need to add substrings in a main string.
Here is the code:
echo "enter number of columnn in this file"
MAIN = ""
for (( POS=1 ; POS <= $NUMBER_OF_COLUMN ; POS++ )); do
echo "enter the name of the column $POS"
MAIN = "$MAIN $BUFFER"
Main intention of this code is adding substrings (namely BUFFER) to the main string (namely MAIN).But I had encounter with this error:
code1: line 12: MAIN: command not found
I appreciate to person who solves this.