9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I got an output file where I have insert some comments inbetween
e.g.
My file looks like this---
userA 10.120.xxx.xxx Jan 21 01:00 03:00 userA1
userB 10.120.xxx.xxx Jul 03 10:00 13:00 userB1
userC 10.120.xxx.xxx Aug 04 14:00 21:00 userC1
I Would like to... (4 Replies)
Discussion started by: Nagesh_1985
4 Replies
2. UNIX for Dummies Questions & Answers
Hello i am back :D,
i have a prolem. I want to Delete the IPs which are in Comments.
Input
192.168.0.1
192.168.0.2
#192.168.0.3
#192.168.0.4 - when TAB or Space, delete too.
/*192.168.0.5
192.168.0.6
192.168.0.7*\
Output
192.168.0.1
192.168.0.2
My solution is sed -e... (7 Replies)
Discussion started by: eightball
7 Replies
3. Shell Programming and Scripting
I want to write a shell script which it takes as argument a java file or a c++ file (.java or .cpp).
It will check if the file is type of java or c++, else it ends with error message.
If all are ok, it will call awk that prints only the comments that the java or c++ file contains, grouping and... (5 Replies)
Discussion started by: Mark_orig
5 Replies
4. Shell Programming and Scripting
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. Shell Programming and Scripting
Delete everything comes in between /* & */.
Current File:
====================
create or replace procedure test421
is
begin
/*
---sasasas/*dsdsds
*/
dbms_output.put_line('SAURABH');
END;
To be File:
===================
create or replace procedure test421
is
begin... (10 Replies)
Discussion started by: susau_79
10 Replies
6. Shell Programming and Scripting
Anyone have a good link for documentation conventions for scripts? (4 Replies)
Discussion started by: gliesian
4 Replies
7. Programming
Hi
can anyone help me regarding the meaning of the following lint messages.
what is the use of having such lint comments in the c program.
/*lint -esym(534,cputs,fgets,cprintf) */
/*lint -efile(766,pragmas.h) */
Thanks a lot in advance. (5 Replies)
Discussion started by: axes
5 Replies
8. Post Here to Contact Site Administrators and Moderators
Go to your CP and select the 'UNIX Forums' style (skin)... it's new!
Comments welcome.... Neo (7 Replies)
Discussion started by: Neo
7 Replies
9. UNIX for Dummies Questions & Answers
It may be a no-brainer, but the answer is escaping me right now:
I'm trying to write a little script to remove all comments from .c source... I was thinking sed, but I'm not a very strong regexp user (e.g. I suck with sed).
I tried dumping the file into:
sed -e 's/\/\* * \*\///g'
and several... (1 Reply)
Discussion started by: LivinFree
1 Replies
PPI::Token::Comment(3) User Contributed Perl Documentation PPI::Token::Comment(3)
NAME
PPI::Token::Comment - A comment in Perl source code
INHERITANCE
PPI::Token::Comment
isa PPI::Token
isa PPI::Element
SYNOPSIS
# This is a PPI::Token::Comment
print "Hello World!"; # So it this
$string =~ s/ foo # This, unfortunately, is not :(
bar
/w;
DESCRIPTION
In PPI, comments are represented by "PPI::Token::Comment" objects.
These come in two flavours, line comment and inline comments.
A "line comment" is a comment that stands on its own line. These comments hold their own newline and whitespace (both leading and trailing)
as part of the one "PPI::Token::Comment" object.
An inline comment is a comment that appears after some code, and continues to the end of the line. This does not include whitespace, and
the terminating newlines is considered a separate PPI::Token::Whitespace token.
This is largely a convenience, simplifying a lot of normal code relating to the common things people do with comments.
Most commonly, it means when you "prune" or "delete" a comment, a line comment disappears taking the entire line with it, and an inline
comment is removed from the inside of the line, allowing the newline to drop back onto the end of the code, as you would expect.
It also means you can move comments around in blocks much more easily.
For now, this is a suitably handy way to do things. However, I do reserve the right to change my mind on this one if it gets dangerously
anachronistic somewhere down the line.
METHODS
Only very limited methods are available, beyond those provided by our parent PPI::Token and PPI::Element classes.
line
The "line" accessor returns true if the "PPI::Token::Comment" is a line comment, or false if it is an inline comment.
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.2 2011-02-25 PPI::Token::Comment(3)