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 dencom 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: starlite79
  • Content: Threads
  • Order by date
  1. 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...
  2. starlite79

    replace specific line of files with "some expression"

    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"\...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. starlite79

    getting info from web stats

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

    time derivative symbol

    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 &middot; --but I do not think that is correct.
  11. starlite79

    missing initial left parenthesis in format...

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

    read files from directory and send to a list file

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

    how to use getdate on HP UX

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

    setting up automated ssh in cronjob

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

    question about date command on HP UX

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

    defining part of a string (YYMMDD date format) with shell script

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

    defining string for date in YYMMDD format

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

    concatenating a new filename with existing name plus string

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

    Using AWK to get part of filename

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

    reading lines that continue in Python

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

Part and Inventory Search

Back
Top