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 Chriss Miller 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: *

  • Users: columb
  • Content: Threads
  • Order by date
  1. columb

    Non greedy pattern matching

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

    Confused about string matching

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

    NIM restore from mksysb

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

    ssh and quoting

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

    Treating the last line differently

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

    Disk wiping

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

    yum equivalent of up2date

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

    Emulating Unix 'basename'

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

    parsing exceptions

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

    sorting within a variable

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

    One or two square brackets

    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$...
  12. columb

    Topas displaying old data

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

    counting a split

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

    list numbers between $start and $finish

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

    A nightmare of quoted quotes

    Hi all I've developped a script for checking that quotes are balanced in other scripts. It looks like#!/bin/ksh [[ $# -ne 1 ]] && { echo invalid param count; exit 1; } [[ -r $1 ]] || { echo Unable to read $1; exit 1; } awk -v CH=\' '{ occ=0; while (y=index($0,CH)) { occ++; y++...
  16. columb

    Has enormity crossed over?

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

    Root logins on minimal RedHat

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

    Counting quotes

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

    Traiing course IBAU18GB

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

    Two consoles

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

Part and Inventory Search

Back
Top