Can somebody explain if you think the answer is wrong??
0
0
senshisays:
I just ran the command –
1. For the above question
for token in a b c;do
echo -n “$token “;
done
Ans – a b c
2. A similar question
for token in a b c;do
echo -n ${token};
done
Ans – abc
To prevent confusion I have posted both variations. Note that when token is in quotes with space, the space between characters is maintained as is. Else all white spaces are removed.
The correct answer is B.
1
0
I think it is A – note the space before the second “
0
1
The answer is B. Token removes the white spaces so a b c would become abc.
0
0
https://www.ibm.com/support/knowledgecenter/SSPT3X_4.2.0/com.ibm.swg.im.infosphere.biginsights.commsql.doc/doc/r0000719.html
Can somebody explain if you think the answer is wrong??
0
0
I just ran the command –
1. For the above question
for token in a b c;do
echo -n “$token “;
done
Ans – a b c
2. A similar question
for token in a b c;do
echo -n ${token};
done
Ans – abc
To prevent confusion I have posted both variations. Note that when token is in quotes with space, the space between characters is maintained as is. Else all white spaces are removed.
0
0