You can get variables you've exported with GETENV, or things you've fed it on the commandline with GETARG, but we don't seem to be FORTRAN experts, ergo it would really be much simpler to just follow the suggestion I gave you days ago: Don't bother opening any files inside FORTRAN at all. Read from standard input, write to standard output. This is often how UNIX utilities are supposed to work anyway -- makes things easier to put in a pipe chain.
'standard input' and 'standard output' amount to pre-opened file numbers, stdin being either 5 in F77 or 100 in F95, and stdout being 6 in F77 or 101 in F95 (according to According to this). Reviewing the thread, I see this was even linked earlier.
When you don't redirect them, they inherit it from whatever it's being run from -- in a terminal, it would get your keyboard as stdin and your screen as stdout. But you can send them anywhere you want with the shell:
So if myprogram was an F77 program, writing to 6 would write to outputfile and reading from 5 would read from inputfile...
Last edited by Corona688; 11-03-2011 at 01:23 PM..
suppose have different files
1.1
2.2
3.3
4.4
5.5
All the files have to run under the same command say
tr -d '\n'
so how to run all the files under the same command by using shell script (3 Replies)
Hi Frdz
while read line
do
name=`echo $line | cut -d' ' -f 1 `
password=`echo $line | cut -d`-` -f 2`
name > logfile.txt
password > logfile.txt
done < list.txt
When it is run, am getting last values in list.txt file only,it is not storing lall the list entry values. How can i... (5 Replies)
Hi,
I have thousands of files in a directory that have the following 2 formats:
289620178.aln
289620179.aln
289620180.aln
289620183.aln
289620184.aln
289620185.aln
289620186.aln
289620187.aln
289620188.aln
289620189.aln
289620190.aln
289620192.aln....
and:
alnCDS_1.fasta (1 Reply)
Hello
I am trying to run a python program using shell script, which takes a single argument from a file.
This file has one entry per line :
1aaa
2bbb
3ccc
4ddd
5eee
...
...
...
My shell script runs the program, only for the last entry :
#!/bin/sh
IFS=$'\n'
for line in $(cat... (2 Replies)
Hello all,
I am in need of assistance in creating a script that will remove a specified block of text from multiple .htaccess files. (roughly 1000 files)
I am attempting to help with a project to clean up a linux server that has a series of unwanted url rewrites in place, as well as some... (4 Replies)
I have a script where the the 9th line looks like this:
$filename=sprintf("250.1chr%d.ped", $N);
I want to modify this script 1000 times, changing 250.1chr%d.ped to 250.2chr%d.ped, 250.3chr%.ped.......and so on all the way to 250.1000chr%d.ped and store each output in files called
... (4 Replies)
I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files:
for i in 250.*; do
|| awk... (4 Replies)
HI,
I am trying to implement a simple shell script program that does not make use of ls or find commands as they are quite expensive on very large sets of files. So, I am trying to generate the file list myself. What I am trying to do is this:
1. Generate a file name using shell script, for... (2 Replies)
Hi Everybody,
I'm a newbie to shell scripting, and I'd appreciate some help. I have a bunch of .txt files that have some unwanted content. I want to remove lines 1-3 and 1028-1098.
#!/bin/bash
for '*.txt' in <path to folder>
do
sed '1,3 d' "$f";
sed '1028,1098 d' "$f";
done
I... (2 Replies)
Discussion started by: BabyNuke
2 Replies
LEARN ABOUT V7
f77
F77(1) General Commands Manual F77(1)NAME
f77 - Fortran 77 compiler
SYNOPSIS
f77 [ option ] ... file ...
DESCRIPTION
F77 is the UNIX Fortran 77 compiler. It accepts several types of arguments:
Arguments whose names end with `.f' are taken to be Fortran 77 source programs; they are compiled, and each object program is left on the
file in the current directory whose name is that of the source with `.o' substituted for '.f'.
Arguments whose names end with `.r' or `.e' are taken to be Ratfor or EFL source programs, respectively; these are first transformed by the
appropriate preprocessor, then compiled by f77.
In the same way, arguments whose names end with `.c' or `.s' are taken to be C or assembly source programs and are compiled or assembled,
producing a `.o' file.
The following options have the same meaning as in cc(1). See ld(1) for load-time options.
-c Suppress loading and produce `.o' files for each source file.
-p Prepare object files for profiling, see prof(1).
-O Invoke an object-code optimizer.
-S Compile the named programs, and leave the assembler-language output on corresponding files suffixed `.s'. (No `.o' is created.).
-f Use a floating point interpreter (for PDP11's that lack 11/70-style floating point).
-o output
Name the final output file output instead of `a.out'.
The following options are peculiar to f77.
-onetrip
Compile DO loops that are performed at least once if reached. (Fortran 77 DO loops are not performed at all if the upper limit is
smaller than the lower limit.)
-u Make the default type of a variable `undefined' rather than using the default Fortran rules.
-C Compile code to check that subscripts are within declared array bounds.
-w Suppress all warning messages. If the option is `-w66', only Fortran 66 compatibility warnings are suppressed.
-F Apply EFL and Ratfor preprocessor to relevant files, put the result in the file with the suffix changed to `.f', but do not compile.
-m Apply the M4 preprocessor to each `.r' or `.e' file before transforming it with the Ratfor or EFL preprocessor.
-Ex Use the string x as an EFL option in processing `.e' files.
-Rx Use the string x as a Ratfor option in processing `.r' files.
Other arguments are taken to be either loader option arguments, or F77-compatible object programs, typically produced by an earlier run, or
perhaps libraries of F77-compatible routines. These programs, together with the results of any compilations specified, are loaded (in the
order given) to produce an executable program with name `a.out'.
FILES
file.[fresc] input file
file.o object file
a.out loaded output
/usr/lib/f77pass1 compiler
/lib/c1 pass 2
/lib/c2 optional optimizer
/usr/lib/libF77.a intrinsic function library
/usr/lib/libI77.a Fortran I/O library
/lib/libc.a C library, see section 3
SEE ALSO
S. I. Feldman, P. J. Weinberger, A Portable Fortran 77 Compiler
prof(1), cc(1), ld(1)DIAGNOSTICS
The diagnostics produced by f77 itself are intended to be self-explanatory. Occasional messages may be produced by the loader.
BUGS
The Fortran 66 subset of the language has been exercised extensively; the newer features have not.
F77(1)