Sponsored Content
Full Discussion: Commenting lines
Top Forums UNIX for Dummies Questions & Answers Commenting lines Post 302107758 by BOFH on Tuesday 20th of February 2007 01:21:14 PM
Old 02-20-2007
Shell scripts are read a single command at a time so you can't block comment. You'll have to put a # in front of each line.

Carl
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to execute the rest of the code after commenting multiple lines?

Hi, As I have seen in this forum how to comment multiple lines in the script, but it does not work properly for me. It is blocking the code but it does not execute the rest of the codes. This is my code #! /usr/bin/ksh month='date +"m%"' : << Comments Block if || then echo "inc =... (12 Replies)
Discussion started by: Yamini Thoppen
12 Replies

2. Shell Programming and Scripting

commenting

can we use "---------" for commenting......... (2 Replies)
Discussion started by: simmijaswal
2 Replies

3. Shell Programming and Scripting

Commenting xml file lines

Hi , I have a XML file like this <dependency> <groupId>fr.xxxx.portail.ear</groupId> <artifactId>_xxxEAR</artifactId> <version>1.0.0-20xxxxx.xxxxx-x</version> <type>ear</type> </dependency> I need to comment single/multiple lines from XML file. How can i... (6 Replies)
Discussion started by: scorpio
6 Replies

4. Shell Programming and Scripting

Commenting lines

Hi can any body pls help me : I have a file Which Content is like following: p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog ca:3:respawn:/opt/GoldWing/currentPM/local/critagt > /dev/msglog 2<>/dev/msglog ca:3:respawn:/opt/GoldWing/currentPM/local/startcia.sh... (2 Replies)
Discussion started by: Aditya.Gurgaon
2 Replies

5. Shell Programming and Scripting

Commenting lines in a file using SED

Hi, I need to comment the below lines in a file using sed.These are the few lines of the jsp file that need to be commented. if(top.location != location){ top.location.href = location.href; } Using the below command two lines can be commented: if(top.location != location){ ... (9 Replies)
Discussion started by: meetu
9 Replies

6. Shell Programming and Scripting

commenting out lines between two delimiters

Hi All, I am struggling to get my head around the following issue. I am having to comment out lines between two delimiters by placing an asterix in position 7 but retain all lines in the file and in the same order. so for example a file containing: ... ... DELIM1 ... ... DELIM2... (2 Replies)
Discussion started by: Bruble
2 Replies

7. Shell Programming and Scripting

Commenting lines in Shell script

Hi All, I know we can comment by using "#" .... I want to know... is there any way to comment a whole big script easily.... In a file i need to comment more than 15 lines ........ and check the script and un comment back. I am learning VI now so its taking lot of time to comment and un... (4 Replies)
Discussion started by: firestar
4 Replies

8. UNIX for Dummies Questions & Answers

Commenting multiple lines

Hi, Can anyone let me know how to comment multiple lines in VI editor? Many thanks. Regards, Venkat. (3 Replies)
Discussion started by: venkatesht
3 Replies

9. Shell Programming and Scripting

perl: Help with commenting out specific lines

Hi I'm trying to comment out specific lines from /etc/fstab file, for simplicity I'm trying to use perl one liner but it errors out, Below is the Perl oneliner I'm using, perl -wlp -i -e 'BEGIN{$flag=0}if (!/root/) && (!/boot/) && (!/tmpfs/) ) {$flag =1;} elsif (/^$/) {$flag=0} if ($flag)... (2 Replies)
Discussion started by: mbak
2 Replies

10. Shell Programming and Scripting

Commenting Multiple lines using Shell Script

I have an xml file which has following code : <abc-ref> <abc-name>abc.efg.hij.klm</abc-name> </abc-ref> I want to comment this whole section out and I have written the following script : (where "hij" is unique string in the file) TEMPFILE=replaceYY.tmp file=hello.xml sed -n... (6 Replies)
Discussion started by: Dish
6 Replies
wrjpgcom(1)							   User Commands						       wrjpgcom(1)

NAME
wrjpgcom - insert text comments into a JPEG file SYNOPSIS
wrjpgcom [-replace] [-comment text] [-cfile name] [filename] DESCRIPTION
wrjpgcom reads the named JPEG or JFIF file, or the standard input if no file is named, and generates a new JPEG or JFIF file on the stan- dard output. A comment block is added to the file. The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. Although the standard does not actually define the intended function of COM blocks, they are widely used to hold user-supplied text strings. This enables you to add annotations, titles, index terms, and so on to your JPEG files, and later retrieve the COM blocks as text. COM blocks do not interfere with the image stored in the JPEG file. The maximum size of a COM block is 64K, but you can have many COM blocks in one JPEG file. wrjpgcom adds a COM block, containing text that you provide, to a JPEG file. Ordinarily, the COM block is added after any existing COM blocks, but you can delete the old COM blocks if you wish. OPTIONS
The following options are supported: -cfile name Read the text for a new COM block from the named file. -comment text Supply the text for a new COM block on the command line. -replace Delete any existing COM blocks from the file. OPERANDS
The following operands are supported: filename The name of the JPEG file to which you want to add text comments. EXTENDED DESCRIPTION
To add only one line of comment text, use the -comment option to provide the text on the command line. Specify the comment text within quotes, so that the text is treated as a single argument. Longer comments can be read from a text file. If you specify neither the -comment nor the -cfile option, wrjpgcom reads the comment text from standard input. In such cases, you must supply an input image filename. You can enter multiple lines, up to 64KB. Type an end-of-file indicator, usually Ctrl-D, to terminate the comment text entry. wrjpgcom does not add a COM block if the provided comment string is empty. Therefore, you can use -replace -comment "" to delete all COM blocks from a file. EXAMPLES
Example 1: Adding a Short Comment to in.jpg to Produce out.jpg example% wrjpgcom -c "View of my back yard" in.jpg > out.jpg Example 2: Attaching a Long Comment Previously Stored in comment.txt example% wrjpgcom in.jpg < comment.txt > out.jpg or example% wrjpgcom -cfile comment.txt < in.jpg > out.jpg In this example, 1000 is a number that is larger than the number of rows in the source file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWjpg | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
cjpeg(1), djpeg(1), jpegtran(1), rdjpgcom(1) NOTES
This man page was originally written by the Independent JPEG Group. Updated by Breda McColgan, Sun Microsystems Inc., 2004. SunOS 5.10 26 Mar 2004 wrjpgcom(1)
All times are GMT -4. The time now is 04:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy