Sponsored Content
Top Forums Shell Programming and Scripting Retreive latest occurrence if there are multiple occurences Post 302266716 by Raynon on Wednesday 10th of December 2008 10:51:10 PM
Old 12-10-2008
Hi Franklin52,

Your code works!!
Thanks a million.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Trying to retreive and compare value

Hi All, I'm have a file test.txt that looks like this 1939399393 03094994949 948383 I have to check whether the first character in the first line is 1 or not. I have tried the following option but it seems to fail head -1 test.txt | grep ^1 but it seems to display the entire... (3 Replies)
Discussion started by: omahablues
3 Replies

2. UNIX for Dummies Questions & Answers

last occurrence of a string across multiple files

Hello: Thank you for your help. (2 Replies)
Discussion started by: porphyrin
2 Replies

3. Shell Programming and Scripting

find the latest files in multiple directory

I want to get the latest files from multiple directories, d1, d2,d3 and d4 under the parent dierectoy d. can anyone help out with this? thx (3 Replies)
Discussion started by: shyork2001
3 Replies

4. Shell Programming and Scripting

last occurrence of a match through multiple files

Hi all, I have a lot of files with extension ".o" and I would like to extract the 10th line after (last) occurrence of a given string in each of the files. I tried: $ grep "string_to_look_for" *.o -A 10 | tail -1 but it gives the occurrence in the last file with extension .o ... (1 Reply)
Discussion started by: f_o_555
1 Replies

5. Shell Programming and Scripting

How to count the number of occurrence of words from multiple files?

File 1 aaa bbb ccc File 2 aaa xxx zzz bbb File 3 aaa bbb xxx Output: (4 Replies)
Discussion started by: Misa-Misa
4 Replies

6. Shell Programming and Scripting

Remove Duplicates on multiple Key Columns and get the Latest Record from Date/Time Column

Hi Experts , we have a CDC file where we need to get the latest record of the Key columns Key Columns will be CDC_FLAG and SRC_PMTN_I and fetch the latest record from the CDC_PRCS_TS Can we do it with a single awk command. Please help.... (3 Replies)
Discussion started by: vijaykodukula
3 Replies

7. Programming

awk to count occurrence of strings and loop for multiple columns

Hi all, If i would like to process a file input as below: col1 col2 col3 ...col100 1 A C E A ... 3 D E G A 5 T T A A 6 D C A G how can i perform a for loop to count the occurences of letters in each column? (just like uniq -c ) in every column. on top of that, i would also like... (8 Replies)
Discussion started by: iling14
8 Replies

8. UNIX for Dummies Questions & Answers

Display latest record from file based on multiple columns combination

I have requirement to print latest record from file based on multiple columns combination. EWAPE EW1SLE0000 EW1SOMU01 ABORTED 03/16/2015 100004 03/16/2015 100005 001 EWAPE EW1SLE0000 EW1SOMU01 ABORTED 03/18/2015 140003 03/18/2015 140004 001 EWAPE EW1SLE0000 EW1SOMU01 ABORTED 03/18/2015 220006... (1 Reply)
Discussion started by: tmalik79
1 Replies

9. Shell Programming and Scripting

Substitute first occurrence of keyword if occurrence between two other keywords

Assume a string that contains one or multiple occurrences of three different keywords (abbreviated as "kw"). I would like to replace kw2 with some other string, say "qux". Specifically, I would like to replace that occurrence of kw2 that is the first one that is preceded by kw1 somewhere in the... (4 Replies)
Discussion started by: M Gruenstaeudl
4 Replies

10. Shell Programming and Scripting

sed print from last occurrence match until the end of last occurrence match

Hi, i have file file.txt with data like: START 03:11:30 a 03:11:40 b END START 03:13:30 eee 03:13:35 fff END jjjjjjjjjjjjjjjjjjjjj START 03:14:30 eee 03:15:30 fff END ggggggggggg iiiiiiiiiiiiiiiiiiiiiiiii I want the below output START (13 Replies)
Discussion started by: Jyotshna
13 Replies
FOX(1)							      General Commands Manual							    FOX(1)

NAME
fox - ab-initio structure determination from diffraction data SYNOPSIS
fox [options] [file.xml] DESCRIPTION
The fox (Free Objects for Crystallography) program was made for the ab initio crystal structure solution from diffraction data. Its most interesting features for ab initio structure determination are: * versatile description of the crystal contents; * automatic correction for special positions and shared atoms between polyhedra; * the ability to use simultaneously multiple powder patterns; * smart global optimization algorithms; * a graphical interface with a 3D crystal structure view and live updates during the optimization process. OPTIONS
This program my be executed with or without command line options or input file (file.xml). It follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the fox wiki http://objcryst.sourceforge.net/Fox/Manual --help Show summary of options. --loadfouriergrd map.grd Load and display 'map.grd' fourier map with (first) crystal structure --loadfourierdsn6 map.DN6 Load and display a DSN6 fourier map with (first) crystal structure --nogui Run without GUI, automatically launches optimization --nogui may be accompanied by the following options: -n 10000 Run for 10000 trials at most (default: 1000000) --nbrun 5 Do 5 runs, randomizing before each run (default: 1), use -1 to run indefinitely -o out.xml Output in 'out.xml' --randomize Randomize initial configuration --silent Produce (almost) no text output --finalcost 0.15 Run optimization until cost < 0.15 --cif2pattern 1.5406 170 5000 .1 Simulate pattern for input crystal, wavelength=1.5406 up to 170o with 500 points anda peak width of 0.1o EXAMPLES
Fox silicon.xml Load file 'silicon.xml' and launch GUI. Fox Cimetidine-powder.xml --nogui --randomize -n 1000000 -o best.xml Load file 'ktartrate.xml', randomize, then make 1 optimization of 1 million trials, and save the best structure in 'best.xml'. Fox Cimetidine-powder.xml --nogui --randomize -n 10000000 --nbrun 10 -o best.xml Load file 'Cimetidine-powder.xml', then make 10 runs (starting from a random structure) of 10 million trials (each run saves one xml file), and save the best structure in 'best.xml'. Fox Cimetidine-powder.xml --nogui --silent --randomize -n 10000000 --nbrun 10 --finalcost 200000 -o best.xml Load file 'Cimetidine-powder.xml', then make 10 silent runs of 10 million trials (each run saves one xml file), and save the best structure in 'best.xml'. For each run, the optimization stops if the cost goes below 200000. AUTHOR
fox was written by Vincent Favre-Nicolin <Vincent.Favre-Nicolin@cea.fr>. This manual page was written by Carlo Segre <segre@debian.org>, for the Debian project (but may be used by others). July 24, 2008 FOX(1)
All times are GMT -4. The time now is 07:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy