Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to put the comments to 50 lines, using vi editor? Post 302165497 by artikulkarni on Friday 8th of February 2008 03:21:14 AM
Old 02-08-2008
How to put the comments to 50 lines, using vi editor?

Hi All,

Please let me know how I can put a comment (e.g // or #) to more than 50 lines using vi editor in a .cpp/.sh file.

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading lines within vi editor

Hi All, I need to read line by line from a file(created using vi editor) till end of the file and pass it to my own executables so that it will read first line and execute and then other and so on...Thanks The steps are like this; 1) read first line in file 2) execute the job with first line as... (2 Replies)
Discussion started by: asriva26
2 Replies

2. Shell Programming and Scripting

Put two lines into one from file

Hello, I have a script that generates the following file named /tmp/rfkill: rf55 pts/13 Jul 10 06:38 (10.72.11.44) 15782 pts/13 5:07 b rf56 pts/15 Jul 10 06:53 (10.72.11.9) 18552 pts/15 0:28 b rf55 pts/39 Jul 10 09:12 (10.72.11.44) 19354 pts/39... (4 Replies)
Discussion started by: raidzero
4 Replies

3. UNIX for Advanced & Expert Users

Add Comments to the specifi lines i na file

I have a requirement like below.I need to Comment some lines in a file. File contains following information. { attribute1 attribute2 atrribute3 attribute4 attribute5 attribute6 attribute7 } I have a requirement like some times i need to comment lines 3 to before '}' and some... (1 Reply)
Discussion started by: ukatru
1 Replies

4. Shell Programming and Scripting

Sed script, changing all C-comments to C++-comments

I must write a script to change all C++ like comments: // this is a comment to this one /* this is a comment */ How to do it by sed? With file: #include <cstdio> using namespace std; //one // two int main() { printf("Example"); // three }//four the result should be: (2 Replies)
Discussion started by: black_hawk
2 Replies

5. UNIX for Dummies Questions & Answers

Remove blank lines and comments from text file

Hi, I am using BASH. How can I remove any lines in a text file that are either blank or begin with a # (ie. comments)? Thanks in advance. Mike (3 Replies)
Discussion started by: msb65
3 Replies

6. Shell Programming and Scripting

Perl XML, find matching condition and grep lines and put the lines somewhere else

Hi, my xml files looks something like this <Instance Name="New York"> <Description></Description> <Instance Name="A"> <Description></Description> <PropertyValue Key="false" Name="Building A" /> </Instance> <Instance Name="B"> ... (4 Replies)
Discussion started by: tententen
4 Replies

7. What is on Your Mind?

Fun things to put in comments in scripts?

Approaching the end of my portion of some STIG/DOD compliance automation and I was challenged by a co-worker to include a story in my code. There are blocks of code that need to be kept the way they are for GIT/Gerrit and then compliance, but otherwise I changed out all the comments into a... (2 Replies)
Discussion started by: Vryali
2 Replies

8. Shell Programming and Scripting

Please Help! Need to put the lines of a txt to one line

Hi all, I'm quite newbie in shell scripting but I found a problem what I cant solve. I have a .txt file which looks like this: /22/ /23/ /24/ and so on and I'd need to make it look like this: /22/|/23/|/24/|...and so on. these numbers are growing and has lines like this /2a/ as well.... (15 Replies)
Discussion started by: gergo235
15 Replies

9. Shell Programming and Scripting

Grep last two lines, calc & adding comments

....... 06/09/2013|12:00:00 PM|3|26112|40|44032|27419.7|6 1 0 93 |6|1|0|93 06/09/2013|12:30:00 PM|3|26112|40|44032|27491|11 4 0 85 |11|4|0|85 I have "sysperf.out" file containing the lines above. What I like to have on the output is: Node: prod1db ===> this is the hostname Date:... (7 Replies)
Discussion started by: Daniel Gate
7 Replies

10. Shell Programming and Scripting

Put in one line only the lines with digits

Hello, I haven't been here for a while and I might be forgetting some things. I have an input text like this titleA http://myurl/bla/blabla/1234 http://myurl/bla/blabla/6789 titleB http://myurl/bla/blabla/5678 http://myurl/bla/blabla/1234 titleC http://myurl/bla/blabla/9123... (10 Replies)
Discussion started by: Kibou
10 Replies
zipios::ZipCDirEntry(3) 				     Library Functions Manual					   zipios::ZipCDirEntry(3)

NAME
zipios::ZipCDirEntry - Specialization of ZipLocalEntry, that add fields for storing the extra information, that is only present in the entries in the zip central directory and not in the local entry headers. SYNOPSIS
#include <ziphead.h> Inherits zipios::ZipLocalEntry. Public Member Functions ZipCDirEntry (const string &_filename='', const string &_file_comment='', const vector< unsigned char > &_extra_field=vector< unsigned char >()) void setDefaultWriter () ZipCDirEntry & operator= (const class ZipCDirEntry &src) virtual string toString () const Returns a human-readable string representation of the entry. virtual string getComment () const Returns the comment of the entry, if it has one. virtual void setComment (const string &comment) Sets the comment field for the FileEntry. virtual uint32 getLocalHeaderOffset () const virtual void setLocalHeaderOffset (uint32 offset) int getCDirHeaderSize () const virtual FileEntry * clone () const Create a heap allocated clone of the object this method is called for. Friends istream & operator>> (istream &is, ZipCDirEntry &zcdh) ostream & operator<< (ostream &os, const ZipCDirEntry &zcdh) bool operator== (const ZipLocalEntry &zlh, const ZipCDirEntry &ze) Detailed Description Specialization of ZipLocalEntry, that add fields for storing the extra information, that is only present in the entries in the zip central directory and not in the local entry headers. Definition at line 102 of file ziphead.h. Member Function Documentation FileEntry * zipios::ZipCDirEntry::clone () const [virtual] Create a heap allocated clone of the object this method is called for. The caller is responsible for deallocating the clone when he is done with it. Returns: A heap allocated copy of the object this method is called for. Reimplemented from zipios::ZipLocalEntry. Definition at line 231 of file ziphead.cpp. string zipios::ZipCDirEntry::getComment () const [virtual] Returns the comment of the entry, if it has one. Otherwise it returns an empty string. Returns: the comment associated with the entry, if there is one. Reimplemented from zipios::ZipLocalEntry. Definition at line 199 of file ziphead.cpp. void zipios::ZipCDirEntry::setComment (const string &comment) [virtual] Sets the comment field for the FileEntry. Parameters: comment string with the new comment. Reimplemented from zipios::ZipLocalEntry. Definition at line 212 of file ziphead.cpp. string zipios::ZipCDirEntry::toString () const [virtual] Returns a human-readable string representation of the entry. Returns: a human-readable string representation of the entry. Reimplemented from zipios::ZipLocalEntry. Definition at line 218 of file ziphead.cpp. Author Generated automatically by Doxygen for Zipios++ from the source code. Zipios++ Mon Oct 10 2011 zipios::ZipCDirEntry(3)
All times are GMT -4. The time now is 07:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy