All,
I'm passing variables to AWK using the -v option (as recommended in the man page).
This seems to work, but not when the variable is placed inside a regexp for matching.
This is my script's input:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 3098 0.0...
Folks,
I'm fairly new to Perl and UNIX, but have been placed with the UNIX team at work for a month.
My first task is to create a script which mounts NFS shares and raises an alert upon failure (we have a system called 'Remedy' which displays incident alerts to a 24-7 team).
To generate a...
All,
I'm new to Windows Servers and AD, but have a fairly straighforward question.
What I'm wondering is whether AD keeps an audit trail of which machines a user has logged into?
i.e. Is it possible to choose a username (say 'james') and find out the hostname of the last machine 'james'...
Folks,
I'm a VBScripting newbie and have a very simple question.
I'm trying connect to a COM Object as follows:
'Global Vars
dim objFarm
'Create Farm Object
objFarm = ConnectFarm()
Function ConnectFarm( )
Dim objFarm
' Create MetaFrameFarm object
Set objFarm =...
Dear All,
I have a PC with an "Abit Geforce 4 Ti4200 AGP(8x)" graphics card. When I boot Windows, I see the following problems:
1. Splash screen has a few stray black pixels over the Windows logo.
2. The user login screen then has vertcal stripes of black dots.
3. The mouse cursor has about...
Hi All,
A friend asked me recently how to cheaply connect 2 laptops via Wifi (one laptop currently has an adsl modem to be used with ICS).
I said he'd got 2 options:
1. Wireless Linksys router.
2. AP in the ethernet NIC of one laptop with a Wifi card in the other.
My first question is, was...
Hi All,
I am trying to call perl subroutines from within C (as documented in perlembed/perlcall), but I'm not having much luck. If anyone has knowledge/experience in doing this, I would really appreciate your help:
1. I have tried a (very simple) test to call a perl function (hi::say_hi) which...
I'm trying to write a script to send an email containing a traffic monitoring graph from some network management software (MRTG).
Could anyone help me with passing a hash by reference please?
This is my code:
#Main#
#Get info
@mails = get_info()
#Mails is an array of hashes
#Pass by ref...
Hi All,
I am trying to pass a hash which was inside an array and modify the hash in the sub-routine. Could anyone let me know whether this is the correct syntax please?
The data structure should look like this:
Mails [ARRAY] {HASH} {HASH}
0 ---> To...
Hi,
I'm looking for a perl module which can get a file from a remote webserver and load it into an array. The transfer needs to be done using http.
Could anyone point me in the right direction please?
Many thanks,
James.
I've just managed to get SSI's working on Apache (version 1.3)
Does anyone know whether I can specify a remote host within this SSI tag:
<!--#include file="http://my.remote.server/file.html" -->
When I try this, I see the following error:
[an error occurred while processing this...
Hi All,
I'm having some problems with a particular application (called Isis) which sends multicast data between two machines. Every 5 minutes, the application will send a multicast 'heartbeat' between two machines. This is a business critical application and it works well most of the time, but...
Hi All,
I'm having some problems with a particular application (called Isis) which sends multicast data between two machines. Every 5 minutes, the application will send a multicast 'heartbeat' between two machines. This is a business critical application and it works well most of the time, but...
I'm trying to understand some QoS statements which we have on our Catalyst 6500's and I was hoping someone might help me understand what some of the commands mean. If anyone could help me with the below questions, it would be much appreciated.
We have COS and QOS enabled and I'm told that these...
I'm attempting to send emails at specific times of the day using MIME::Lite and the Windows Task Scheduler. Now, most of the time, when the script is run, no one will be near the machine, so I decided to send all errors to a log file.
Here's some sample code:
#Open Log file
open ( LOG...
Hi All,
I'm a relative newbie to Perl and am developing a script to use net::telnet::cisco for labelling a network's switch ports. The problem I have is with this code:
#$name is the new name for the switch port.
#$ports[$i][1] is the existing name of the switch port.
for my $i ( 0..$#ports...
All,
I'm a beginner to NAT/Cisco and I was hoping someone could give me some advice on NAT. The set up is as follows:
- Network 1 (10.97.83.0) - Interface fa0/1
- Network 2 (192.168.200.0) - Interface fa0/0
A machine in network 1 (10.97.83.251) needs to connect on port 3389 (MS RDP) to a...
Could anyone help me with this problem please:
I would like to match the letters "E", "N" and "L" in a string. All these letters must be present, but in any order.
Therefore, the following are possible:
"ENL" or "ELN" or "LEN" or...
Hi All,
I have (almost) finished making a cgi script which displays a rota. You can view it at:
http://62.3.101.118/cgi-bin/rota.pl?showall=current
Now, this page looks OK, until you hit the 'show history' link. When you click this, you are supposed to see every week's rota.
However, the...
Hi All,
This is probably a very simple question, but what is the best way to search an array in perl, while ignoring CASE? I thought this:
#If oncallname is in the secondline array, put it in the hash table
foreach $x (@secondline){
if( ( (lc($oncallname)) eq (lc($x) ) ){...
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.