You are on page 1of 1

ques 1- Today is the day I have joined TCS. In my Batch there are 150 associates.

We have 3 Lgs. Our mode of learning is virtual. you have to print in the standard
output . In the display, each sentence of the statement should be printed in a new
line. How will you do?

Solution-

[u1352325@INTVMAO01 ~]$ echo -e "Today is the day I have joined TCS.\n In my Batch
there are 150 associates.\n We have 3 Lgs.\n Our mode of learning is virtual."
Today is the day I have joined TCS.
In my Batch there are 150 associates.
We have 3 Lgs.
Our mode of learning is virtual.
[u1352325@INTVMAO01 ~]$

2. Write a command to show the result of 10*2.

Solution-

[u1352325@INTVMAO01 ~]$ a=$(( 10*2 ))


[u1352325@INTVMAO01 ~]$ echo "$a"
20

3. Write a command to display only the character count for the statement "Today is
the day I have joined TCS".
[u1352325@INTVMAO01 ~]$ vi CharCount
[u1352325@INTVMAO01 ~]$ wc -c CharCount
35 CharCount

You might also like