Sponsored Content
Top Forums Shell Programming and Scripting Select only the last line from the pattern Post 302682073 by agama on Sunday 5th of August 2012 12:50:47 PM
Old 08-05-2012
You'll need to post a sample of your file in order for someone to answer your question. Assuming that the energy information spans multiple lines in the file, please post a sample of a complete set of the energy data and a few lines that precedes and follow the data. Without these kinds of examples it is impossible to help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract/select pattern from input

Hey, examples of the input (text line): /bla/blMOasdn234.adanif24/blabla.rar /bla/blMOasdn234.adanif24/blabla23124.bin /bla/bla/bla/bla/bla/bla.bin and what I need to do is extract/select only the dir path so the output would be: /bla/blMOasdn234.adanif24/ /bla/blMOasdn234.adanif24/... (4 Replies)
Discussion started by: TehOne
4 Replies

2. Shell Programming and Scripting

find pattern, delete line with pattern and line above and line below

I have a file that will sometimes contain a pattern. The pattern is this: FRM CHK 0000 I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (4 Replies)
Discussion started by: nickg
4 Replies

3. Shell Programming and Scripting

Select everything before a pattern

Hi I have i doubt, actually i have to select everything before a word(pattern).For that i am using sed i am using the below line of code but it is not working i am getting a blank instead.. sed -n '/regexp/{g;1!p;};h' file1 Can anyone help? Thanks (15 Replies)
Discussion started by: usha rao
15 Replies

4. Shell Programming and Scripting

select some text from a test dependng on pattern

I have some absolute file location $INSTALL_BASEPATH/onereview-5.0/resources/commons-messages/commonmessages_default.properties $INSTALL_BASEPATH/onereview-5.0/orv-deploy/config-console.war/WEB-INF/classes/com/connectiva/configuration/console/resource/configurationBundle.properties I need to... (3 Replies)
Discussion started by: mnmonu
3 Replies

5. Shell Programming and Scripting

Select a pattern from file

Hi, I have a requirement to select only a specific pattern from a flat file and delete its occurance. For eg. If my file contains : <A1>1234</A1> <A2>5678</A2> <ABC>1234</ABC> <A3>0987</A3> Then, i want to delete <ABC>1234</ABC> from the file and have the contents as :-... (7 Replies)
Discussion started by: DTechBuddy
7 Replies

6. Shell Programming and Scripting

Select everything between first and last occurrence of same pattern

Greetings, I am writing a script which requires as a part, selecting all the lines between the first and last occurrence of a pattern. I have an nawk alternative that is working. But thre should be a generic script that should run on all os viz, linux, sun , aix. The awk script that i... (25 Replies)
Discussion started by: usha rao
25 Replies

7. Shell Programming and Scripting

Grep the word from pattern line and update in subsequent lines till next pattern line reached

Hi, I have got the below requirement. please suggest. I have a file like, Processing Item is: /data/ing/cfg2/abc.txt /data/ing/cfg3/bgc.txt Processing Item is: /data/cmd/for2/ght.txt /data/kernal/config.klgt.txt I want to process the above file to get the output file like, ... (5 Replies)
Discussion started by: rbalaj16
5 Replies

8. Shell Programming and Scripting

Modifying the shell script to select pattern

Hello, I have script which work 70% of the desired task , the output from script.sh is following , however the desired output I require is following . Any piece of suggestion would be great.. thanks in advance, emily #!/bin/bash ... (8 Replies)
Discussion started by: emily
8 Replies

9. Shell Programming and Scripting

awk to combine lines from line with pattern match to a line that ends in a pattern

I am trying to combine lines with these conditions: 1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text. 2. If condition1 is met then continue to combine lines through a line that ends with a semicolon. 3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies

10. UNIX for Beginners Questions & Answers

Get an output of lines in pattern 1st line then 10th line then 11th line then 20th line and so on.

Input file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
g_enemat(1)					 GROMACS suite, VERSION 4.5.4-dev-20110404-bc5695c				       g_enemat(1)

NAME
g_enemat - extracts an energy matrix from an energy file VERSION 4.5.4-dev-20110404-bc5695c SYNOPSIS
g_enemat -f ener.edr -groups groups.dat -eref eref.dat -emat emat.xpm -etot energy.xvg -[no]h -[no]version -nice int -b time -e time -dt time -[no]w -xvg enum -[no]sum -skip int -[no]mean -nlevels int -max real -min real -[no]coul -[no]coulr -[no]coul14 -[no]lj -[no]lj -[no]lj14 -[no]bhamsr -[no]bhamlr -[no]free -temp real DESCRIPTION
g_enemat extracts an energy matrix from the energy file ( -f). With -groups a file must be supplied with on each line a group of atoms to be used. For these groups matrix of interaction energies will be extracted from the energy file by looking for energy groups with names corresponding to pairs of groups of atoms, e.g. if your -groups file contains: 2 Protein SOL then energy groups with names like 'Coul-SR:Protein-SOL' and 'LJ:Protein-SOL' are expected in the energy file (although g_enemat is most useful if many groups are analyzed simultaneously). Matrices for different energy types are written out separately, as controlled by the -[no]coul, -[no]coulr, -[no]coul14, -[no]lj, -[no]lj14, -[no]bham and -[no]free options. Finally, the total interaction energy energy per group can be calculated ( -etot). An approximation of the free energy can be calculated using: E(free) = E0 + kT log( exp((E-E0)/kT) ), where '' stands for time-average. A file with reference free energies can be supplied to calculate the free energy difference with some reference state. Group names (e.g. residue names) in the reference file should correspond to the group names as used in the -groups file, but a appended number (e.g. residue number) in the -groups will be ignored in the comparison. FILES
-f ener.edr Input, Opt. Energy file -groups groups.dat Input Generic data file -eref eref.dat Input, Opt. Generic data file -emat emat.xpm Output X PixMap compatible matrix file -etot energy.xvg Output xvgr/xmgr file OTHER OPTIONS
-[no]hno Print help info and quit -[no]versionno Print version info and quit -nice int 19 Set the nicelevel -b time 0 First frame (ps) to read from trajectory -e time 0 Last frame (ps) to read from trajectory -dt time 0 Only use frame when t MOD dt = first time (ps) -[no]wno View output .xvg, .xpm, .eps and .pdb files -xvg enum xmgrace xvg plot formatting: xmgrace, xmgr or none -[no]sumno Sum the energy terms selected rather than display them all -skip int 0 Skip number of frames between data points -[no]meanyes with -groups extracts matrix of mean energies instead of matrix for each timestep -nlevels int 20 number of levels for matrix colors -max real 1e+20 max value for energies -min real -1e+20 min value for energies -[no]coulyes extract Coulomb SR energies -[no]coulrno extract Coulomb LR energies -[no]coul14no extract Coulomb 1-4 energies -[no]ljyes extract Lennard-Jones SR energies -[no]ljno extract Lennard-Jones LR energies -[no]lj14no extract Lennard-Jones 1-4 energies -[no]bhamsrno extract Buckingham SR energies -[no]bhamlrno extract Buckingham LR energies -[no]freeyes calculate free energy -temp real 300 reference temperature for free energy calculation SEE ALSO
gromacs(7) More information about GROMACS is available at <http://www.gromacs.org/>. Mon 4 Apr 2011 g_enemat(1)
All times are GMT -4. The time now is 02:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy