Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: viadisky
  • Content: Threads
  • Order by date
  1. viadisky

    I can't use EGREP

    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...
  2. viadisky

    Case Insensitive Search using GREP

    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...
  3. viadisky

    Looking for standard lines inside file using REGEX

    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...
  4. viadisky

    Look for standard lines inside a file using REGEX

    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...
  5. viadisky

    grep portion of a string using sed

    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"...
  6. viadisky

    printing lines using awk

    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...
  7. viadisky

    pair lines together

    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...
  8. viadisky

    print section of file between two regular expressions (inclusive)

    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...
  9. viadisky

    affix timestamp

    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...
  10. viadisky

    Coverting Hour:Minute:Seconds to 1 day

    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...
  11. viadisky

    Count Unique Records Per Hour

    Hi, I have this raw data: 212.227.90.54 - - [31/May/2006:01:00:28 +0100] 212.227.90.54 - - [31/May/2006:01:00:32 +0100] 172.24.3.1 - - [31/May/2006:01:00:09 +0100] 212.227.90.54 - - [31/May/2006:02:00:12 +0100] 212.227.90.54 - - [01/Jun/2006:01:00:45 +0100] 172.24.3.1 - -...
  12. viadisky

    Reduce the Ping response waiting time

    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...
  13. viadisky

    Cisco Command Website

    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!
  14. viadisky

    Formatting repeating block of texts

    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>...
  15. viadisky

    Formatting repeating block of strings

    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>...
  16. viadisky

    grep portion of a string using awk

    Hi, I would like to grep 157 from here --> <text_string>157</text_string> I prefer using awk ... please help :-) Cheers!
  17. viadisky

    Grep text strings between repeating lines

    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...
  18. viadisky

    pick the exact IP Address

    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...
  19. viadisky

    Repeating lines in my query

    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...
  20. viadisky

    Create a range of IP Addresses

    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...

Part and Inventory Search

Back
Top