10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I need some guidance with understanding this Perl script below. I am not the author of the script and the author has not leave any documentation. I supposed it is meant to be 'easy' if you're a Perl or regex guru. I am having problem understanding what regex to use :confused: The script does... (3 Replies)
Discussion started by: newbie_01
3 Replies
2. Shell Programming and Scripting
I am not a big expert in regex and have just little understanding of that language.
Could you help me to understand the regular Perl expression:
^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{
------
This is regex to select functions from a C/C++ source and defined in... (2 Replies)
Discussion started by: alex_5161
2 Replies
3. Shell Programming and Scripting
Could anyone please make me understand how the ?= works below ..
After executing this I am getting the same output.
$string="I love chocolate.";
$string =~ s/chocolate(?= ice)/vanilla/;
print "$string\n"; (2 Replies)
Discussion started by: scriptscript
2 Replies
4. Programming
Hello folks,
Looking for a quick help on regex in my perl script.
here's the string i want to parse and get the 2nd field out of it.
$str = " 2013-08-07 12:29 Beta ACTIVE";
I want to extract 'Beta' out of this string. This string will keep on changing... (2 Replies)
Discussion started by: jhamaks
2 Replies
5. Programming
Hello,
I'm trying to get a quick help on regex since i'm not a regular programmer.
Below is the line i'm trying to apply my regex to..i want to use the regex in a for loop and this line will keep on changing.
subject=... (4 Replies)
Discussion started by: jhamaks
4 Replies
6. Shell Programming and Scripting
Hi,
I have a perl script to read the log file and create a report from it. I have the script file and log file in a different directories. Now i have pipe the log file data to the perl script to create the report (HMTL file). I am using the below command this isn't working
tail -f... (4 Replies)
Discussion started by: vel4ever
4 Replies
7. Programming
HI,
I'm new to perl and need simple regex for reading a file using my perl script.
The text file reads as -
filename=/pot/uio/current/myremificates.txt
certificates=/pot/uio/current/userdir/conf/user/gamma/settings/security/... (3 Replies)
Discussion started by: jhamaks
3 Replies
8. Shell Programming and Scripting
Hi all,
I was wondering, if there is any way to generate boxes/tables using perl to represent some data in better format.
input :
Name SAlary
pranav 10000
ajay 5000
shri 15000
output :
_________________________
|Name |Salary |... (3 Replies)
Discussion started by: PranavEcstasy
3 Replies
9. Shell Programming and Scripting
Hi,
I have file stored in a directory containing information about subnet mask and next hop address in the following format
10.1.1.0/16, 255.255.0.0, 10.1.1.1
10.1.2.0/16, 255.255.0.0,10.1.2.1
here 10.1.1.0/16 represent range of ip address 10.1.1.1-10.1.1.16
given say an IP address... (1 Reply)
Discussion started by: termeric
1 Replies
10. Shell Programming and Scripting
I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly:
if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies