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

    Awk only printing lines I'm changing

    Thanks Feherke and Annihilannic! Feherke, my command line said "awk -f tolerance input_f > output_f", where tolerance was the name of the awk program.
  2. starlite79

    Awk only printing lines I'm changing

    Good evening. I am trying to modify an awk program I received tremendous help with in this awk forum. I am working with a fortran file, and I want to change the value of one array element (the tolerance) to some other value. I also want the program to print to file all other lines of the...
  3. starlite79

    replace specific line of files with "some expression"

    Thanks for the help. Sorry for the late response, but I was away from my computer for a week. This seemed to do what I wanted (I wanted to replace line 38) perl -i -ple '$_ = "<div id=\"body\" class=\"clearfix\">" if $. == 38; close ARGV if eof' *.html It's actually what she meant; just...
  4. starlite79

    replace specific line of files with &quot;some expression&quot;

    Hi, I have some webpages that I built using a template. The first 38 lines of each html file are the same. I'd like to use Perl to change line 38 to say <div id = "body" class="clearfix"> (It currently is <div id="body">) I was thinking of trying this: perl -ple '$_ = "<div id=\"body"\...
  5. starlite79

    cubic interpolation subroutine

    SOLVED: I removed the statements, * U1 = U(1) * X1 = X(1) * U2 = U(2) * X2 = X(2) and now it compiles and produces reasonable results. Thanks for explaining that what I was looking at was not a multi-dimensional array but rather a statement function.
  6. starlite79

    cubic interpolation subroutine

    OK, thanks to mikrom for clarifying what Q really is. The compiler thinks this statement function is unexpected. Have my dummy arguments been declared correctly? I don't want anything to be implicitly defined.
  7. starlite79

    cubic interpolation subroutine

    Hi, I'm not sure I understand you completely, but I did the following to the code: IMPLICIT NONE * INTEGER I,J,N,N1,NN INTEGER I,J,N,N1,NN,NMAX * REAL A,C,Q,Q1,QN,S,U,X PARAMETER (NMAX = 20) REAL A,C,Q,Q1,QN,S,U,X,U1,U2,X1,X2 * DIMENSION...
  8. starlite79

    cubic interpolation subroutine

    I'd like to use IMPLICIT NONE for a subroutine called spline.f attached below. However, trying to declare all variables correctly is giving me erroneous results. The arrays are being passed by another routine that is calling spline.f. If I try to use IMPLICIT NONE as the only change, I get...
  9. starlite79

    defining maximum number of delivery attempts

    Hello again. I have a better understanding of what happened. Bounce backs from bogus email addresses first went into /var/spool/mqueue. After a time they went into /var/spool/clientmqueue. Sendmail would continue to try to deliver to bogus email addresses, and consequently the clientmqueue...
  10. starlite79

    defining maximum number of delivery attempts

    Hi everyone. I'm wondering if there is a way to define in the sendmail.mc or sendmail.cf the maximum # of delivery attempts? While testing some mailing scripts using mutt as the MUA and sendmail as the MTA, a partition became full because sendmail kept trying to deliver mail to bogus e-mail...
  11. starlite79

    obsolete go to statements

    xwb, It is probably not a coincidence that the subroutine I'm trying to modify is named shells! I will see what I can do with the link you provided.
  12. starlite79

    obsolete go to statements

    Hi, I am trying to modify code that is using go to statements everywhere. I want to use something more standard and also easier to read, but I am giving myself a headache trying to sort this out. Here is what I have: IMPLICIT NONE INTEGER i,igap,iex,ik,imax,ipl,j,k,l,n...
  13. starlite79

    checking that date has MMDDYYYY format

    This is very much appreciated!
  14. starlite79

    checking that date has MMDDYYYY format

    Thanks Annihilannic. I tried something with echo and grep as you suggested, but it is not working. Could you look over my code snippet and let me know if anything catches your attention? # Define a variable for the analysis files. Earliest analysis file for 2008 # is from January 1, 2008...
  15. starlite79

    checking that date has MMDDYYYY format

    Hi all, This relates to the closed thread thread822-1501717. I've modified the script to get files in a range of two dates that are supplied on the command line while running the script. I want to test that both $1 and $2 are in the format MM/DD/YYYY. This is what I have so far: # Define a...
  16. starlite79

    kshell script: brackets in for loop

    Hi, Feherke, I am pretty sure it is that line. During testing, I had gotten a ``myname[0-9][0-9]'' file created, which was not what I wanted. PHV, I will give the ?? a try and update later.
  17. starlite79

    kshell script: brackets in for loop

    Hi, I have a script that runs successfully on an old HP-UX system as a shell script, though on Linux it seems it needs to be a kshell script. In any case, I have several files that start as a few letters (like myname) and end with two digits 0-9 (so the possible file names can be myname00-99...
  18. starlite79

    getting average of one field if it matches another field

    I used different variables for each counter, and this seems to have solved my problem. I used n, a, and b.
  19. starlite79

    getting average of one field if it matches another field

    Hi again. I have a very large file (over 22000 records) for which I want to search for a field equaling 5.0, 6.0 and 7.0 (third field) and getting the count and average of the second field matching those 3 values. My code runs, but I don't trust the values I get. Could someone offer some...
  20. starlite79

    getting info from web stats

    Thanks! I came up with the following workaround to the | metacharacter, but your one liner is cleaner. #!/usr/bin/awk # This awk program reads web statistics with six columns and returns # information on which html and gif files received 100 or more hits # in a particular month. { if...

Part and Inventory Search

Back
Top