Sponsored Content
Top Forums Shell Programming and Scripting To Get 1st record from 1st file from list of files Post 302394798 by Corona688 on Friday 12th of February 2010 03:08:34 PM
Old 02-12-2010
Code:
read RECORD < /grid/abc1010.txt

echo "The first record in /grid/abc1010.txt is '${RECORD}'"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

MERGE 13 files and add the file name at the end of each record

Hi Gurus, I have 13 comma(,) seperated files that i have to merge and create a single file which has file name attached at th end of each record in the out put file. Can any one please help me with writing a unix script with this issue? test1.dat BIG ID,Local ID,Bond... (2 Replies)
Discussion started by: vkr
2 Replies

2. Shell Programming and Scripting

compare two files and make 1st file same as 2nd file

I am trying to compare two file and make changes where ever its different. for example: Contents of file1 IP=192.165.89.11 NM=255.255.0.0 GW=192.165.89.1 Contents of file2 IP=192.165.89.11 NM=255.255.255.255 GW=192.165.89.1 NOTE HERE THAT NM IS DIFFERENT So i want the changes... (6 Replies)
Discussion started by: pradeepreddy
6 Replies

3. UNIX for Dummies Questions & Answers

two files.say a and b.both have long columns.i wanna match the column fron 1st file w

ex: a file has : 122323 123456456 125656879 678989965t635 234323432 b has : this is finance no. this is phone no this is extn ajkdgag idjsidj i want the o/p as: 122323 his is finance no. 123456456 this is phone no 123456456 ... (4 Replies)
Discussion started by: TRUPTI
4 Replies

4. Shell Programming and Scripting

Take a list if strings from a file and search them in a list of files and report them

I have a file 1.txt with the below contents. -----cat 1.txt----- 1234 5678 1256 1234 1247 ------------------- I have 3 more files in a folder -----ls -lrt------- A1.txt A2.txt A3.txt ------------------- The contents of those three files are similar format with different data values... (8 Replies)
Discussion started by: realspirituals
8 Replies

5. UNIX for Dummies Questions & Answers

how to copy files and record original file location?

:EDIT: I think my post name should have been labeled: how to copy files and record original file location. not "retain". Hello, this is my first post! I searched the forums a lot before posting, but was unable to answer my question. Here's my problem: There are several hundred text files... (4 Replies)
Discussion started by: willie8605
4 Replies

6. Shell Programming and Scripting

awk - compare 1st 15 fields of record with 20 fields

I'm trying to compare 2 files for differences in a selct number of fields. When differnces are found it will write the whole record of the second file including appending '|C' out to a delta file. Each record will have 20 fields, but only want to do comparison of 1st 15 fields. The 1st field of... (7 Replies)
Discussion started by: sljnk
7 Replies

7. Shell Programming and Scripting

Extract timestamp from first record in xml file and it checks if not it will replace first record

I have test.xml <emp><id>101</id><name>AAA</name><date>06/06/14 1811</date></emp> <Join><id>101</id><city>london</city><date>06/06/14 2011</date></join> <Join><id>101</id><city>new york</city><date>06/06/14 1811</date></join> <Join><id>101</id><city>sydney</city><date>06/06/14... (2 Replies)
Discussion started by: vsraju
2 Replies

8. Shell Programming and Scripting

Replace a string for every record after the 1st record

I have data coming in the below format for each record <?xml version="1.0" encoding="UTF-8" standalone="no"?><test_sox xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><testdetials>....</test_sox> <?xml version="1.0" encoding="UTF-8" standalone="no"?><test_sox... (8 Replies)
Discussion started by: dsravanam
8 Replies

9. UNIX for Beginners Questions & Answers

Compare 1st column from 2 file and if match print line from 1st file and append column 7 from 2nd

hi I have 2 file with more than 10 columns for both 1st file apple,0,0,0...... orange,1,2,3..... mango,2,4,5..... 2nd file apple,2,3,4,5,6,7... orange,2,3,4,5,6,8... watermerlon,2,3,4,5,6,abc... mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies

10. UNIX for Beginners Questions & Answers

Not sure how to describe it but how to format this list so that it print the 1st field once only

Hi, Not sure how to describe the problem. But basically, I have this file listing here app01_app.test.com.ph|PROGRAM=SQL Developer|HOST=AKL0TS100|USER=Admtest01|HOST=10.111.12.23| app02_app.test.com.ph|PROGRAM=D:\interface\apps\bin32\batch.exe|HOST=AKL0TS100|USER=Admtest09|HOST=10.111.12.35|... (3 Replies)
Discussion started by: newbie_01
3 Replies
X2SYS_REPORT(1gmt)					       Generic Mapping Tools						X2SYS_REPORT(1gmt)

NAME
x2sys_report - Report statistics from crossover data base SYNOPSIS
x2sys_report -Ccolumn -TTAG [ coedbase.txt ] [ -A ] [ -I[list] ] [ -L[corrtable] ] [ -Nnx_min ] [ -Qe|i ] [ -Rwest/east/south/north[r] ] [ -Strack ] [ -V ] DESCRIPTION
x2sys_report will read the input crossover ASCII data base coedbase.txt (or stdin) and report on the statistics of crossovers (n, mean, stdev, rms, weight) for each track. Options are available to let you exclude tracks and limit the output. -C Specify which data column you want to process. Crossovers related to this column name must be present in the crossover data base. -T Specify the x2sys TAG which tracks the attributes of this data type. OPTIONS
No space between the option flag and the associated arguments. coedbase.txt The name of the input ASCII crossover error data base as produced by x2sys_cross. If not given we read standard input instead. -A Eliminate COEs by distributing the COE between the two tracks in proportion to track weight and producing (dist, adjustment) spline knots files for each track (for the selected column). Such adjustments may be used by x2sys_datalist. The adjustment files are called track.column.adj and are placed in the $X2SYS_HOME/TAG directory. For background information on how these adjustments are designed, see Mittal [1984]. -I Name of ASCII file with a list of track names (one per record) that should be excluded from consideration [Default includes all tracks]. -L Apply optimal corrections to the chosen observable. Append the correction table to use [Default uses the correction table TAG_cor- rections.txt which is expected to reside in the $X2SYS_HOME/TAG directory]. For the format of this file, see x2sys_solve. -N Only report data from tracks involved in at least nx_min crossovers [all tracks]. -Q Append e for external crossovers or i for internal crossovers only [Default is external]. -R west, east, south, and north specify the Region of interest, and you may specify them in decimal degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left and upper right map coordinates are given instead of w/e/s/n. The two shorthands -Rg and -Rd stand for global domain (0/360 and -180/+180 in longitude respectively, with -90/+90 in latitude). Alterna- tively, specify the name of an existing grid file and the -R settings (and grid spacing, if applicable) are copied from the grid. For Cartesian data just give xmin/xmax/ymin/ymax. This option bases the statistics on those COE that fall inside the specified domain. -S Name of a single track. If given we restrict output to those crossovers involving this track [Default output is crossovers involv- ing any track pair]. -V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. EXAMPLES
To report statistics of all the external magnetic crossovers associated with the tag MGD77 from the file COE_data.txt, restricted to occupy a certain region in the south Pacific, try x2sys_report COE_data.txt -V -TMGD77 -R180/240/-60/-30 -Cmag > mag_report.txt To report on the faa crossovers globally that involves track 12345678, try x2sys_report COE_data.txt -V -TMGD77 -Cfaa -S12345678 > faa_report.txt REFERENCES
Mittal, P. K.(1984), Algorithm for error adjustment of potential field data along a survey network, Geophysics, 49(4), 467-469. SEE ALSO
x2sys_binlist(1) x2sys_cross(1) x2sys_datalist(1) x2sys_get(1) x2sys_init(1) x2sys_list(1) x2sys_put(1) x2sys_solve(1) GMT 4.5.7 15 Jul 2011 X2SYS_REPORT(1gmt)
All times are GMT -4. The time now is 09:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy