I'm trying to work on xml without loading the xml parsing bits. Here's what I've got so far
#!/usr/bin/perl -w
use strict;
my $string2 = '
<node description>
<hook>
<text> Blurb about Red Hat
</text>
</hook>
</node>
<node second node>
<hook>hooky AIX thing
</hook>
</node>
<node...
So, I'm working with data lines which end with a return code and an optional non numeric message code. What I have so far is
my @bits = split /\s+/;
if ( $bits[-1] =~ /^\d+$/ )
{ $retcode = $bits[-1]; }
else
{ $retcode = $bits[-2]; }
No problem with that, it works but why can't I use
my...
I'm testing the 'bare metal' restore of a 650.
The system was built and installed as a NIM client. I then did a mksysb using the 'Define a Resource' SMIT screen. I then wanted to test the rebuild. I booted the box into the sms menus and setup the IPL so that network booting would work. I then...
I'm writing a procedure in bash which copies files around a number of servers. As a basic check I'm runningssh remote_host 'cd /remote/dir;ls | wc -l'
So far all well and good.
However some of the servers are only reachable via a double jump. i.e. to run a comand you have to runssh remote1 ssh...
I have a perl script I would like to migrate to awk. It's quite simple - it copies a file and amends the footer to reflect the number of records (line count so far minus one for the header). In perl it looks like#!/usr/bin/perl -w
use strict;
$#ARGV == 2 or die "Invalid agument count\n";
open...
We've been told to wipe disks to UK DOD standard 5220.22m. Does anyone know of any products we might use on an SP system running AIX 4.3
I keep saying that half an hour with my Black and Decker would be far more effective but you know what security types are like ;-)
Thanks
On the internet no...
On my old systems I used to run
up2date --update --downloadto retrieve the files andup2date --update to apply the patches.
Now I've inherited a RHEL 5 server with yum instead of up2date. I've googled all I can but I can't find the equivalent of up2date --update --download for yum. Any pointers...
I want to do the same as the Unix 'basename' command, i.e. split off the path from a file. I'm trying perl -e 'foreach ( "/path/to/file" ) { s!.+/!!; print "$_\n"; } and gettingModification of a read-only value attempted at -e line 1.
I've tried a number of variations but and re-read...
I have a script which looks something like
#!/bin/ksh
for file in *
do
# Skip known exceptions
[[ $file = this ]] && continue
[[ $file = that ]] && continue
[[ $file = other ]] && continue
process_file $file
done
Now I want to pass the exceptions as parameters. The best I can think of...
I have a script which uses ssh to access a number of remote systems. There are a number of ways in which these systems can be chosen and I build up a list. Typically, at the end of the input stage the list might look like
echo $_boxes
40 42 44 46 48 50 52 54 40 42 44 46 48 50 52 54 100 102 104...
All
I'm working in ksh on AIX 5.1. Can anyone explain the difference between the [ condition ] and [[ condition ]]. for example, an actual screen scrape
b01301$ ls -d one*
one one.two.three one.txt one_list onedir
b01301$ [ -f one* ] && echo yes || echo no
yes
b01301$...
I have an AIX 4.3.3 system with a version of topas compiled for AIX 4.2. Unfortunately I'm not allowed to updater either.
For many years topas has run perfectly but recently it always displays the same non changing process data. Whereas this data might have been correct once it is now obviously...
I have a string which looks likebit1,bit2,bit3,bit4and I want to count the number of bits. What I have so far ismy @bits = split /,/;
print $#bits, "\n";which works fine but do I really need to declare the array? I've tried constructs such as
print $#(split /,/) and a number of variants but I...
I know there's a ksh routine to list the numbers between any two arbitrary points but I can't find it. Any answers please.
On the internet no one knows you're a dog
Columb Healy
I'm sure that everyone in this forum is aware that enormity means
but the incorrect usage as a synonym for 'huge' has become so common that it passes almost without comment.
Today's New York Times uses the 'huge' definition on its opinion page. Is this a sign that the definition has...
I'm building some servers with the minimum required to run my particular application. As it requires a graphic internet browser and development tools I've chosen no packages except
X Windows - Firstboot
Graphical Internet - Firefox
Development tools - default selection
However, this build...
Ok, so I've got the Syntax error at line 165 : `"' is not matched.message. What would make my life so much simpler would be if I had a script (awk?) which counted quotes per line and flagged any where the number of quotes was uneven.
Any ideas?
Should this be in the awk forum?
On the internet...
My boss has been trying to book me on an AIX performance/tuning course for some time. We've finally got some money in the budget and he's identified course ref IBAU18GB.
Looking at this, it looks a little basic for someone like me who's got six years AIX systems admin under his belt (it looks...
I have a 44P Model 270 with two serial ports on the back. Whilst the system is botting up, e.g. the SMS screen, it uses one port, once it is live e.g. all output after the SMS screen is on the other port.
I can live with this but I'd prefer not to. Any ideas?
On the internet no one knows...
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.