Hi,
I'm currently running this version of Perl in my MS Windows XP machine.
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 33 registered patches, see perl -V for more detail)
Copyright 1987-2006, Larry Wall
Binary build 819 [267479] provided by ActiveState...
Hi,
I created a very basic Perl script that can grep item inside a file and display the result on the screen.
#!C:\Perl\bin\perl.exe
open (FILE, '<Fruits.txt')or die "$!\n";
@array = <FILE>;
@result = grep (/apple/, @array);
print @result;
close (FILE);
Fruits.txt contains these lines...
Hi,
I need the help of all regex gurus out there.
Listed below are standard lines I need to check inside a file. A file should be okay if all these lines can be found and in the right order.
ip name-server 4.3.2.1
ip name-server 3.2.3.2
ip name-server 1.1.1.1
I created a very basic REGEX to...
Hi,
I need the help of all regex gurus out there.
Listed below are standard lines I need to check inside a file. A file should be okay if all these lines can be found and in the right order.
ip name-server 4.3.2.1
ip name-server 3.2.3.2
ip name server 1.1.1.1
I created a very basic REGEX to...
Hi,
I submitted this query before and Feherke kindly provided solution: (thread822-1198142)
I'm trying to use the same sed command to format my data but I think I missed something because it's not providing the result I'm expecting.
My original data looks like this:
MRTG$ grep -i "System"...
Hi,
I would like to make this script more flexible by changing the "1" in "NR==1" into a variable.
In1=`awk 'NR==1' file`
In2=`awk 'NR==3' file`
diff=`expr $In2 - $In1`
echo $diff
The file I need to work on is like this:
1 In1
2 Out1
3 In2
4 Out2
5 In3
6 Out3
7...
Hi,
I have this raw data:
maria olan 4
olan maria 5
maria danie 9
danie maria 10
Based from this data, I can say that "maria olan 4" and "olan maria 5" lines are pair. I did create a simple awk that would display either of these lines showing the one with the maximum value in the last column...
I saw this from one of the awk one-liner examples. This will print a section of the file between these two regular expressions Iowa and Montana.
awk '/Iowa/,/Montana/'
How can I modify this to tell awk to start showing lines from Iowa up to the first blank line it will see?
awk '/Iowa/,/<1st...
Hi,
How can I place the Timestamp at the beginning of each line. Basically creating/adding another column showing the timestamp for each block of data. Note that there are two blocks of data here:
Date 28/06/2006 Time 0:00:40
Date 28/06/2006 Time 0:01:24
And then creating another column...
Hi,
I generated the data below from one of our network devices. Basically it's just an indication of how long a port is in it's current state.
160
0:00:19.75
The whole number "160" indicates the number of days and the "0:00:19.75" indicates H:MM:SS
Is there a one-liner awk that can convert...
Hi,
I have this script that pings range of addresses, basically the output I get is like this:
172.24.58.1 is alive
172.24.58.2 is alive
172.24.58.3 is alive
no answer from 172.24.58.4
no answer from 172.24.58.5
no answer from 172.24.58.6
no answer from 172.24.58.7
no answer from 172.24.58.8...
Hi,
I'm looking for a website that will allow me to enter a cisco command and then will provide explanation after.
Can anybody recommend a site?
Cheers!
Hi,
I have this data to work with:
<ConfigPolicyVO>
<ConfigPolicyID>61</ConfigPolicyID>
<ConfigPolicyName>access-list 99</ConfigPolicyName>
<Description>access-list 99</Description>
<Comments></Comments>
<Status>1</Status>
<CreateDate>2006-02-23 17:10:47:000</CreateDate>...
Hi,
I have this data to work with:
<ConfigPolicyVO>
<ConfigPolicyID>61</ConfigPolicyID>
<ConfigPolicyName>access-list 99</ConfigPolicyName>
<Description>access-list 99</Description>
<Comments></Comments>
<Status>1</Status>
<CreateDate>2006-02-23 17:10:47:000</CreateDate>...
Hi,
I have this data to manipulate. Basically, all I need to do is to put "SYMBOL:" and "Parent Submap:" values side-by-side.
SYMBOL: 172.21.203.8
Object Type: 3
Parent Submap: Alabama
Symbol Type: Network:IP Network
Label: 172.21.203.8
Symbol Position: 1:721x644+140+152
Hidden...
Hi,
I need to pick "172.21.3.1" from the list of IP Addresses below (grep isn't the command for this because it will pick all these addresses).
172.21.3.1
172.21.3.11
172.21.3.12
172.21.3.13
172.21.3.100
Is there any command better than grep? I have an idea to use "wc -c" command but I find...
Hi,
How can I reduce repeating lines into a single line in my query?
Vlan2 172.18.226.251 255.255.255.240
Vlan2 172.18.226.251 255.255.255.240
Vlan2 172.18.226.251 255.255.255.240
Vlan2 172.18.226.251 255.255.255.240
Vlan2 172.18.226.251 255.255.255.240
Vlan2 172.18.226.251 255.255.255.240...
Hi,
I need to ping a range of IP Addresses. I have this three data to use:
Minimum IP Address: 172.24.2.1
Maximum IP Address: 172.24.3.254
Total No. of Hosts: 510
Basically, I just need to create a script that can generate a list of IP Addresses starting from 172.24.2.1 up to 172.24.3.254
I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.