My problem is to read a text file word by word and recovers every word in a variable. I tried to do:
while read ligne;
do {
for ( i=1; i<= length ($ligne); i++); do
{ var=$(awk '{print $i}' test.txt)}
}done < test.txt
But it doesn't work and I have this error:
Couldn't parse this for loop
doneon your seconddo. You only have onedone, aligning to yourwhile ... doloop.