Im using awk and I want the output filename to contain the first field of the input file.
Ex.
1 dddd wwwww
1 eeeee wwww
1 wwww eerrrr
2 eeee eeeeee
I want the output files to be xxx1 and xxx2
Thank you (4 Replies)
I'm calling an embedded sql from my shell script file. This sql does simple task of spooling out the contents of the table (see below my sample code) into a spool file that I specify. So far so good, but the problem is that the output is also displayed on screen which I do NOT want.
How can I... (3 Replies)
Hi everybody,
I'm trying to replace the $98 field with "T" if the last field (108th) is T
I've tried
awk 'BEGIN{OFS=FS="|"} {if ($108=="T")sub($98,"T"); print}' test.txt
but that doesn't do anything
also tried
awk 'BEGIN{OFS=FS="|"}{ /*T.$/ sub($98,"T")} { print}' test.txt
but... (2 Replies)
Dear All,
1.txt (tab in between each value in a line)
a b c
a b c
a c d
you can see below, why with ~ i can output with tab, but = cannot?
# awk -F'\t' '$2 ~ /b/' 1
a b c
a b c
# awk -F'\t' '$2 = "b"' 1
a b c
a b c
a b d
... (1 Reply)
It seems like a common task, but I haven't been able to find the solution.
vitallog.txt
1310,John,Hancock
13211,Steven,Mills
122,Jane,Doe
138,Thoms,Doe
1500,Micheal,May
vitalinfo.txt
12122,Jane,Thomas
122,Janes,Does
123,Paul,Kite
**OUTPUT**
vitalfiltered.txt
12122,Jane,Thomas... (2 Replies)
In awk, how do I print all fields with a specified output field separator?
I have tried the following, which does not print the output FS:
echo a b c d | awk 'BEGIN{OFS = ";"}{print $0}' (3 Replies)
Hello,
I'm writing an Awk script to take a command line argument (student's name) and output their relevant student#, name, and marks. For some reason, awk arbitrarily removes the first digit from the student number and doesn't show me the proper output.
Here is my code:
#! /usr/bin/awk -f... (6 Replies)
The awk below is close but I can't seem to fix it to produce the desired output. Thank you :).
current awk with output
awk '{c1++; c2+=($2)}
END{for (e in c1) print e, c1, c2}' input
EFCAB5 2 50
USH2A 2 19
desired... (8 Replies)
The below awk uses $3 and $4 in search as the min and max, then takes each $2 value in lookup and compares it. If the value in lookupfalls within the range in searchthen it prints the entire line in lookup/ICODE]. What I can't seem to figure out is how to print the matching $5 from search on that... (4 Replies)
Hi Folks,
I have one requirement, There is one file, which contains two fields.
Based on first field, I need to print an output.
Example will be more suitable.
Input file like this.
abc 5
abc 10
xyz 6
xyz 9
xyz 10
mnp 10
mnp 12
mnp 6 (2 Replies)
Discussion started by: Raza Ali
2 Replies
LEARN ABOUT DEBIAN
mp2
mp2(1)mp2(1)NAME
mp2 - Moller-Plesset Perburbation Theory
DESCRIPTION
The module determines the second-order Moller-Plesset energy and one-particle density matrix (OPDM) for RHF, UHF, and ROHF (using semi-
canonical orbitals) references. Frozen orbitals can be used when computing the energy but not the OPDM.
REFERENCES
Original Moller-Plesset paper:
1. C. Moller and M. S. Plesset, "Note on an Approximation Treatment for Many-Electron Systems," Phys. Rev. 46, 618 (1934).
Open-Shell Perturbation Theory
1. T. D. Crawford, H. F. Schaefer, and T. J. Lee, "On the energy invariance of open-shell perturbation theory with respect to unitary
transformations of molecular orbitals," J. Chem. Phys. 105, 1060 (1996).
MP(2) Gradient Theory:
1. M. Frisch, M. Head-Gordon, and J. Pople, "A Direct MP2 Gradient Method," Chem. Phys. Lett. 166, 275 (1990).
2. I. Nielsen, "A new direct MP2 gradient algorithm with implementation on a massively parallel computer," Chem. Phys. Lett. 255, 210
(1996).
INPUT FORMAT
Input for this program is read from the file input.dat. The following keywords are valid:
WFN = string
Specifies the type of wave function desired. The only valid entry at the present is MP2. There is no default.
REFERENCE = string
Specifies the type of orbitals used for the single-determinant reference function. Valid entries include RHF, UHF, and ROHF. There
is no default.
PRINT = integer
Determines the verbosity of the output. A value of 0 (the default) specifies minimal printing.
CACHETYPE= string
Selects the priority type for maintaining the automatic memory cache used by the DPD codes. (See libdpd.html for further details.)
A value of LOW (the default) selects a "low priority" scheme in which the deletion of items from the cache is based on pre-pro-
grammed priorities. A value of LRU selects a "least recently used" scheme in which the oldest item in the cache will be the first
one deleted.
CACHELEV= integer
Selects the level of automatic cacheing desired in the storage of various amplitudes, integrals, and intermediates in the coupled
cluster procedure. A value of 0 retains no quantities in cache, while a level of 6 attempts to store all quantities in cache. For
particularly large calculations, a value of 0 may help with certain types of memory problems. The default is 2, which means that
all four-index quantites with up to two virtual-orbital indices (e.g., <ij|ab> integrals) may be held in the cache.
OPDM = boolean
If TRUE calculate the one-particle density matrix and make OPDM_WRITE default to TRUE. The default value of OPDM is FALSE.
OPDM_WRITE = boolean
Flag for whether or not to write the one-particle density matrix to disk.
OPDM_PRINT = boolean
Flag for whether or not to print the one-particle density matrix.
10 August, 2003 mp2(1)