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