PrepAway - Latest Free Exam Questions & Answers

What is the output of the following command sequence?

What is the output of the following command sequence? Exhibit:

PrepAway - Latest Free Exam Questions & Answers

A.
a b c

B.
abc

C.
anbncn

D.
token token token

E.
“a ” “b ” “c “

5 Comments on “What is the output of the following command sequence?

      1. senshi says:

        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

Leave a Reply