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

    ...n=split($0,a,", +") oldtol=a[1] # remove line continuation and white space sub("[[:space:]:]*","",oldtol) } sub(oldtol,newtol) print next } # print any other lines in the Fortran input FNR != NR { print } The...
  3. starlite79

    replace specific line of files with "some expression"

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

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

    ...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"\ class=\"clearfix"\>" if $. == 38; close ARGV if eof' *.html Is the syntax right for using literal quotes and...
  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

    ...c if less than 4 points are supplied, straight lines are fitted. c integer i,j,n,n1,nn real a,c,q,q1,qn,s,u,x dimension x(*),u(*),s(*),a(*) c q(u1,x1,u2,x2)=(u1/x1**2-u2/x2**2)/(1.0/x1-1.0/x2) c n=iabs(nn) if (n.le.3) then c series too short for cubic...
  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

    ...to sort this out. Here is what I have: IMPLICIT NONE INTEGER i,igap,iex,ik,imax,ipl,j,k,l,n DOUBLE PRECISION sv,x(n),k(n) * dimension x(n),k(n) igap = n DO 1 i = 1,n 1 k(i) = i * 5 if(igap.le.1) go to 25 IF(igap.le.1) THEN * now sort k's...
  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

    ...$4, "for", $6 } } I have a follow-up question. I ran the code on four months of web stats and concatenated and sorted the output by *.html or *gif. I then manually found the average hits for each unique filename. Could awk have read this file and told me the average hits per...

Part and Inventory Search

Back
Top