I am new to shell scripting . I need to read a file that works in all shells with the variables defined in it. Sort of:
variable1=test1 variable2=test2 ....
I need to read this file line by line and prepare a new line, separated by spaces, for example:
variable=variable1=test1 variable2=test2 ....
I tried with the code below:
while read LINE do $VAR="$VAR $LINE" done < test.dat
but he throws me this error:
command not found Test.sh: line 3: = variable1=test1
source share