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

What is the difference between running a script as ./scriptname.sh and sh scriptname.sh

1 Answers  


write a shell script to find the largest number from 3 given numbers.

6 Answers  


Explain about debugging?

0 Answers  


Is shell scripting useful?

0 Answers  


How do I run a powershell script?

0 Answers  






How can the contents of a file inside jar be read without extracting in a shell script?

0 Answers  


When we login into our account which files are executed?

3 Answers   Chip Quest,


How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }

0 Answers   Wipro,


What are "c" and "b" permission fields of a file?

0 Answers  


how will you find the total disk space used by a specific user?

0 Answers  


What is INODE?

2 Answers  


Is shell and terminal the same?

0 Answers  


Categories