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 SkipVought 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: fidge
  • Order by date
  1. fidge

    Test value of &1 before prompt

    In that case, is there another way to pass in a variable?
  2. fidge

    Test value of &1 before prompt

    Hello all, I have a script which takes a telephone nummber as its only variable i.e script 01256123456. I would like to test that the variable given is a) populated b) all numeric, and c) no greater than 11 chars in length. I can test b and c, but not a, as if the script is run without a...
  3. fidge

    Date/time calculations

    Thanks feherke thats worked, although i've had to copy the files into a server with gawk. I made one slight change and that was to print $0 before it prints out the results. Thanks again.
  4. fidge

    Date/time calculations

    Thanks sbrews. Unfortunatley the transactionstimes are from a log file, so its an historical check I was thinking of trying to convert the strings to an epoch value, and subtracting the end from the start. Does that sound a good way? I'm using hpux 11, is there an easy(1) to get the epoch...
  5. fidge

    Date/time calculations

    Hi, I need to calulate how long a 'transaction' took to complete. I have the start and end times in format yymmddhhmmssss for example; Start,end 06111500010000,06111500010000 06111500004300,06111500010000 The problem I have is that I can find no way of converting this so that it takes the...
  6. fidge

    help - A better way?

    Thanks olded and annihilannic, but i'm going to stick with the awk option. I need to run this against 30 files containing between 80-120k records, and awk is so much faster. thnaks again.
  7. fidge

    help - A better way?

    Thanks, that worked in under 30 seconds for 90k records.
  8. fidge

    help - A better way?

    Sorry wrong forum. Moved to unix scripting
  9. fidge

    help - A better way?

    Hello I have the following which although works, runs very slowly. Can anybody help with a better/faster approach? i'm trying to find out the concurrent rate of transactions Thanks. input file ========== start date/time , end date/time 0610060000580,0610060001000 0610060000580,0610060001000...
  10. fidge

    counts, grouped by the hour

    thanks santamufasa that worked perfectly.
  11. fidge

    counts, grouped by the hour

    Hi, I have a table that holds data for the whole days transactions. Each record has a date/time entry. i.e trans1,user,date/time I would like to count how many transaction i have received per hour. Could somebody explain the correct way to do this please. Thanks in advance for any help...
  12. fidge

    Adding new lines at lines 95 of 233

    thanks PHV and Annihilannic, both solutions worked. I see where I went wrong now.
  13. fidge

    Adding new lines at lines 95 of 233

    Hi, I'm trying to add 17 new lines after a certain string is found. The string is located on line 94 of a 233 line file. I've found the following, which adds the new lines correctly, but does not write lines 96-233 to the output file: awk '1;$1=="name=mark"{exit}END{print "name2=scott\n...
  14. fidge

    Editing a file using a script

    Thanks P5wizard, thats works fine. Dont suppose you know why the char translation fails?
  15. fidge

    Editing a file using a script

    Hi, I have a problem with a file containing "£". The file itself is created under oracle/Tru64 and transfered (ftp) to redhat linux. all this works fine, however when its pushed through a tomcat process it translates the "£" as "?". I've found a workaround and thats to vi and write quit the...
  16. fidge

    Mailing 8-bit chars

    Thanks for your help. That works fine.
  17. fidge

    Mailing 8-bit chars

    Hi, Does anybody have a solution to mailing 8-bit chars? I'm trying to mail (using mailx) the "£" symbol, but it does not reach its destination. Is there a solution? Thanks in advnace for any help.
  18. fidge

    How to use 2 patterm matches

    Thanks for trying to help with this. The good news is I have got it working, by going about it a different way Cheers
  19. fidge

    How to use 2 patterm matches

    The output of search is.... "01234567890: Action not allowed" I need to extract the 1st eleven chars (01234567890), and find out which filename its located in. Once found I need to print the filename at the beginning of the other printf statements in the script i.e filename.ext -...
  20. fidge

    How to use 2 patterm matches

    Hi all, Can anyone help with my problem? I have a script where I need to find a) pattern1 in file x b) get next line details c) If substr != PMS_GEN then d) if substr = PMS_DEL or substr = PMS_ADD printf Here's what I have so far which works fine: awk '/PATTERN1/ { if ( $7 ~...

Part and Inventory Search

Back
Top