How to include comments in your shell scripts?

Answers were Sorted based on User's Feedback



How to include comments in your shell scripts?..

Answer / ranjana

# comments

Is This Answer Correct ?    4 Yes 0 No

How to include comments in your shell scripts?..

Answer / rameshs

#!/bin/bash
echo "Say Something"
<<COMMENT1
your comment 1
comment 2
blah
COMMENT1
echo "Do something else"

Is This Answer Correct ?    0 Yes 1 No

How to include comments in your shell scripts?..

Answer / vipul dalwala

To comment multiple lines U can use

: '
comment1
comment2
comment3
'

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Shell Script Interview Questions

Explain about the exit command?

0 Answers  


What is bash used for?

0 Answers  


write a scwipt that a) takes exactly one argument, a directory name. b) if the number of argument is more or less than one,print a usage message c) if the argument is not adirectory, print another message d) for the given directory, print the five biggest files and the five files that were most recently modified. e) save the output to a file called q2output.

2 Answers  


What are zombie processes?

0 Answers  


There is a record with fields namely name,roll no.,salary,grade etc.Now,write a script to create a file with multiple records have same combination of fields but with unique roll numbers.The script should work for different names in the input file.

1 Answers   Wipro,






Determine the output of the following command: name=shubham && echo ‘my name is $name’.

0 Answers  


How many fields are present in a crontab file and what does each field specify?

0 Answers  


How to group the commands in shell scripting?

2 Answers   Polaris,


what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?

1 Answers  


I have 2 files and I want to print the records which are common to both.

0 Answers  


write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line?

6 Answers   IBM, Wipro,


What is the use of echo in shell script?

0 Answers  


Categories