recategorized by
1,607 views
3 votes
3 votes

Which of the following shell scripts will produce the output “my first script”?

  1. for i in my first script { echo –i $i }
  2. for my first script; do echo –n; done
  3. for i in my first script; do echo –i $i; done
  4. for n in my first script; do echo –i $i; done
recategorized by

1 Answer

2 votes
2 votes
ans should be C  

for loop has control variable i which will be assigned he value after it  and do apply for loop to print it should be enclosed in do...done block

echo -i $i display the currrent  contents of i
Answer:

Related questions

0 votes
0 votes
1 answer
2
2 votes
2 votes
1 answer
3
go_editor asked Jul 24, 2016
1,241 views
Match the following for Windows Operating System $:$$\begin{array}{} \text{(a)} & \text{Hardware} & \text{(i)} & \text{Starting all processes, emulation of different} \\...
3 votes
3 votes
1 answer
4
go_editor asked Jul 22, 2016
4,211 views
Which of the following is not a part of an expert system shell?Knowledge baseInterference engineExplanation facilityNone of the above