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...
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...
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...
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...
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...
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
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...
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 "I" (Incoming) or an "O" (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...
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.