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...
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...
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"\...
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.
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.
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...
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...
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...
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...
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...
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...
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...
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.
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.