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 TouchToneTommy 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: moria6
  • Content: Threads
  • Order by date
  1. moria6

    Using awk to print lines at matching "offsets" in file

    I am trying to print lines from a file in the format line (a), line (a + (# of lines in file)/2). Example file shown below (MAC addresses followed by switch port numbers for the curious, pulled from an snmpwalk). First MAC adrs (line 1 in this case) goes with first port (line 9) and so...
  2. moria6

    Windows 2003 Cross Domain Trust Issues

    I have two windows domains for which I need to add Domain A users to Domain B. In order to do this I fired up the Active Dir Domains and Trusts wizard. There I found out that: Domain A windows 2003 domain domain & forest functional level ==> Windows Server 2003 Domain B Windows 2003 domain...
  3. moria6

    Bash Script Parameters with grep

    I'm trying to pass text with a space (in this case a date,e.g. Jan 20) as a parameter to grep in a shell script. tst.sh filename.txt Jan 20 # where $1 is filename.txt, $2 is Jan 20 #!/bin/bash cat $1 | grep $2 grep err's out with grep: 20: No such file or directory Can anyone...
  4. moria6

    Cisco ASA Port Forwarding

    Trying to replace a Linksys router/firewall ( BEFSR41 ) with a Cisco ASA5505 (ran out of ports and port forwarding capability - also would like to do more with network management and vpn but that's for later) Linksys device was set to forward ports from one public IP address to multiple private...
  5. moria6

    sed - delete until match every line

    I would like to delete chars from the start of the line until pattern match (in this case the word "Local") in every line. I know how to delete 1st "n" chars and how to delete a pattern but not how to combine the two. Any help much appreciated! maurie
  6. moria6

    Convert MAC Address format

    I would like to ask for help in converting a MAC address in the format: 0000.0000.0000 (Cisco IOS) to 00:00:00:00:00:00 Not picky about using sed or awk (or perl). The CAT OS boxes are a bit easier for me because I only have to use sed to replace "-" with ":" 00-00-00-00-00-00 (CAT...
  7. moria6

    Substitution and newline in file

    Thanks to one of the helpful people in this forum I learned how to use "tr" for substitution. What I'd like to do now is add a newline to what I'm doing. I have <filename> containing: http://www.slashdot.org|http://www.digg.com|http://www.google.com|..... after using cat <filename> | tr...
  8. moria6

    Date in output filename

    Would like some help in inserting the date in the filename output from a perl program as such: something.pl >> cfg072105.txt something1.pl >> sam072105.txt etc.... so output to a 3-letter desgination + mmddyy + .txt Thanks in advance! maurie
  9. moria6

    Data Structures Help

    In an effort to increase my perl knowledge (almost non-existant) and work on a project, I need help with getting statistics from an e-mail log file. I would like to output a file with an entry for each unique sender and the number of times that sender appears in the log file. I know enough to...
  10. moria6

    Comma-delim math help

    I have a comma-delim file of between 20-30k lines. I'd like to sum the 19th field based on whether the first field is an &quot;I&quot; (Incoming) or an &quot;O&quot; (Outgoing) and sum the number of I's and O's as well. I'd ideally like to see 4 values output: #In, #Out, Size In, Size Out...

Part and Inventory Search

Back
Top