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 strongm 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: *

  1. landhippy

    Tracking time spent during a while loop

    Realised that mine did not work if the current minute was 57, 58 or 59 and the timeout was 3. The old version was stopped straight away because 58 (start minute) was greater than 1 (stop minute) Got around that as follows (a bit messy though), I add 60 to the stop and start (if it is less than...
  2. landhippy

    Tracking time spent during a while loop

    Thanks for the replies, in the end I hacked the start date/time. I had to check that the timeout value (in minutes) plus the start minutes did not overlap an hour. So far it seems to work fine :) #!/bin/sh #** Ver Who When What #** --- --- ----...
  3. landhippy

    Tracking time spent during a while loop

    Unfortunately $SECONDS is not available. What shell were you using for that?
  4. landhippy

    Tracking time spent during a while loop

    I have a unix script which searches for a specific set of gif files and finshes when all of the files are found. For example, the scripts is called as find_gifs "andy*.gif" 5 which waits until it finds 5 gif files that match the given criteria, see code below: #!/bin/sh #** Ver...
  5. landhippy

    Getting a Unix server IP address

    Thanks, I had come up with the following: use Socket; #Include the socket library. $hostName = $ARGV[0]; #Grab command line parameter $addr1 = inet_aton($hostName); #Get IP address in internal format. $addr2 = inet_ntoa($addr1); #Get the IP address in...
  6. landhippy

    Getting a Unix server IP address

    I need to run a Perl script to return the IP address of the server the script is running on.
  7. landhippy

    PERL - Moving line within a file

    As you can probably tell I am a complete beginner to Perl, spent about 30 minutes on it yesterday and came up with the following, in the end I needed to move three files to another part of the file: #!/usr/local/bin/perl #** Identification Label TIBER #** Filename...
  8. landhippy

    PERL - Moving line within a file

    As you can probably tell I am a complete beginner to Perl, spent about 30 minutes on it yesterday and came up with the following, in the end I needed to move three files to another part of the file: #!/usr/local/bin/perl #** Identification Label TIBER #** Filename...
  9. landhippy

    PERL - Moving line within a file

    I need to parse a HTML file containing an java applet call, that is created by a third-party application, and move a line to the bottom of an applet definition. I am considering using awk or sed but a colleague recommended Perl. I need to cut the following line and then insert it back into the...

Part and Inventory Search

Back
Top