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...
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"\...
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...
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...
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,
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...
Hi there.
I would like to have awk read a file with web stats and print out those lines that had 100 or more hits in a given month.
Here is my code:
#!/usr/bin/awk
# This awk program reads web statistics with five columns and returns
# information on which html and gif files received 100 or...
Hi there.
I have been searching for the time derivative HTML symbol that is compatible in most browsers. It looks like a single dot above the quantity. The closest thing I could find was the · --but I do not think that is correct.
Hi.
I am trying to write some standard output to file with a name based on a few characters from a file name I specify. Here are some important chunks of code I'm using:
character*20 infile1(20), infile2(20), tfile
do 100 i=1,15
read(iunit(1),1099) infile1(i)
100...
Hi,
I would like to create a list of the 15 most recent files in a directory. So far I've used the command
ls -rt | tail -15
My question is: How do I assign this to a variable, say LIST, and then copy the list to a file, as in
cp $LIST > $INPUT_LIST ?
My goal is to use this list in a...
I am wondering how to use getdate on HP UX. Based on the man page for getdate, I should just need to type getdate("yesterday"); to return yesterday's date. However, I get a syntax error when I do this.
The man page also mentions creating a user defined template of date formats, but if this is...
I have a colleague who has set up pass phrases/keys using ssh-keygen. He would like to write a script that uses ssh to read a read-only file containing the passphrases so that the script can be automated (as in a cronjob running in the middle of the night, and no one is awake to enter...
Hi,
I was wondering if there is an equivalent command on HP UX that will produce the same output as RHEL date --date="1 day ago" does?
When I did a man date on a HP UX machine, no --date option was found.
Hi,
I am writing a kshell script to wget a bunch of files that have a nameYYMMDDname.data format. I attempted to define a string for the YYMMDD part as follows using strftime
# Define a string for the YYMMDD part of the filename.
s=strftime('%y%m%d')
Next I defined the filename as such...
Hi,
I am writing a kshell script to wget a bunch of files that have a nameYYMMDDname.data format. I attempted to define a string for the YYMMDD part as follows using strftime
# Define a string for the YYMMDD part of the filename.
s=strftime('%y%m%d')
Next I defined the filename as such...
Hi,
I have an $infile variable defined and am creating a statistics file with the string "-stats" at the end.
For example, one infile is data.source and the statsfile is defined as $statsfile = $infile . -stats;
On my RHEL machine the result is what I want:
data.source-stats
However, I'm...
Hi,
First question: can I use awk in a Fortran program?
Second: I'd like to use substr to get the part of a file itself (not the contents of the file). For example, I have many files in a directory with the same prefix and a YYMMDD.dat suffix. I want to pick out the YY part of the filename...
Hi there.
I am attempting to read a Fortran file that has the ":" as a continuation character to denote that the function continues on the next line. For example,
{blanks} CALL FUNCTION ( ARG1, ARG2, ARG3
{blanks} : ARG4, ARG5 )
How would I tell Python to know that if it...
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.