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 Mike Lewis 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: *

  1. moria6

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

    Thank you, Sir! Two syntax errors appeared (as you wrote "...typed, untested"). Added close ']' near the end and ",i++" in the for statement awk '{a[NR]=$0}END{for(i=1;i<=NR/2;i++)print a[i]","a[i+(NR/2)]}' file Thank you again for your help!!! maurie
  2. moria6

    Using awk to print lines at matching &quot;offsets&quot; 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...
  3. moria6

    Windows 2003 Cross Domain Trust Issues

    Thanks for the links! They definitely helped. Waiting now for the software vendor (mixed mode domain) to "bless" raising the level to 2003 mode. Thanks again!!! maurie
  4. 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...
  5. moria6

    Bash Script Parameters with grep

    Thanks, p5wizrd! Works perfectly. Also thanks for the feline tip. I am subjecting that text file to 10 other |'d "contortions" (various sed & awk manipulations) the first of which is an awk statement to swap a couple of fields hence the four-legged startup. I will gradually try to clean...
  6. 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...
  7. moria6

    Cisco ASA Port Forwarding

    hepcatg: Your code is better than what I used and I will make the changes and test in the AM. Thanks again!!! moria6
  8. moria6

    Cisco ASA Port Forwarding

    Hepcatg: Your code fixed the problem but revealed another. ;) Started seeing "MSS exceeded, MSS 0" errors. I played around with various settings for the sysopt connection tcpmss x command until issuing a sh asp drop command showed no more MSS drops. Still not getting the expected traffic...
  9. moria6

    Cisco ASA Port Forwarding

    Thanks for the reply and suggestion, hepcatg! I've been asked to hold off until early Saturday morning before I try another cut-over. Will let you know how it goes. Thanks again!!! moria6
  10. 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...
  11. moria6

    sed - delete until match every line

    That works perfectly! Thank you!!! maurie
  12. 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
  13. moria6

    Convert MAC Address format

    Thanks, PHV! That does the trick and helps me be a little bit less of a sed newbie. ;) Thanks again! maurie
  14. 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...
  15. moria6

    Substitution and newline in file

    Worked perfectly. Thanks, Feherke! maurie
  16. 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...
  17. moria6

    need script for ip address resolution

    Thanks, PHV! And, again, sorry, vlad!!! I was asleep at the wheel here and placed my new post where a reply belonged. Apparently too much blood in my caffeine system today. maurie
  18. moria6

    need script for ip address resolution

    DOH!!! Sorry! Filled this out in the wrong place. Guess I need more caffeine. Again my apologies maurie
  19. moria6

    need script for ip address resolution

    Would like to replace all instances of "|" (pipe symbol) with a newline in text file so that http://www.google.com|http://www.slashdot.org|http://www.digg.com... becomes http://www.google.com http://www.slashdot.org http://www.digg.com Tried sed 's/|/\n/' < $input.txt > $output.txt...
  20. moria6

    Date in output filename

    Thanks for the tip, Sam! Starting out there aren't so many files and I wouldn't have had a problem but after a while I'd have a huge directory to sort / search thru and THAT would have been painful. Thanks again! maurie

Part and Inventory Search

Back
Top