LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-04-2010, 01:39 PM   #16
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58

Agree, line needs to be identified. I think the shorter pattern can handle the situation very well.

For this example, i.e the output of squidstat, Is there any ambiguity or chance of getting ambiguity?
 
Old 05-04-2010, 01:43 PM   #17
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by PMP View Post
...
For this example, i.e the output of squidstat, Is there any ambiguity or chance of getting ambiguity?
I have no idea and don't want to bother. I.e. I have a habit of writing pretty long recognition patterns in order to "sleep well at night".
 
Old 05-04-2010, 07:13 PM   #18
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 181

Original Poster
Rep: Reputation: 18
Thank you Sergei

output is like this

Quote:
[root@server test]# perl test.pl
$number_of_active_connections=15 at test.pl line 9.
[root@server test]#
How to print just number not all these words i need just number as the output. Cacti needs just number to be able to catch.

UPDATE: Sorry I managed to print $number_of_active_connections

Last edited by markotitel; 05-04-2010 at 07:25 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not embed Perl in C vinayashrestha Programming 3 02-18-2009 02:47 AM
commandline autocompletion for my shell script mmn357157 Linux - General 5 09-11-2008 11:29 AM
Embed X... okeyla Linux - Software 3 09-02-2005 03:34 PM
Encrypting Passwords in a commandline Script vendolis Linux - Newbie 1 08-29-2003 12:29 AM
Embed Console elist Linux - General 2 01-11-2002 06:57 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration