MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Shell scripts need to be saved with an extension .sh
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Shell scripts need to be saved with an extension . sh . Explanation: It’s not mandatory to save script files with . sh extension but we do so for our own convention as it makes it easy to match them with wildcards.

Detailed explanation-2: -sh extension for shell scripts–but it’s not a useful convention. It’s better not to use an extension at all. The advantage of being able tell that foo.sh is a shell script because of its name is minimal, and you pay for it with a loss of flexibility.

Detailed explanation-3: -A shell script usually has the file extension . sh (Bourne or Korn shell) or . csh (C shell). When you run a script or batch file, ESSCMD executes the commands in sequence until it reaches the end of the file.

Detailed explanation-4: -Shell scripts are executed in a separate child shell process. Answer : True.

Detailed explanation-5: -Our first shell script nano will ask you if you want to save the modified file. Hit the y key (for “yes"). nano will then confirm if you want to save to the file named hello.sh . Hit Enter to confirm this.

There is 1 question to complete.