Sponsored Content
Top Forums Shell Programming and Scripting How to store it in a file and help with code?? Post 302494363 by Franklin52 on Monday 7th of February 2011 03:44:01 AM
Old 02-07-2011
Something like this?
Code:
nawk -F\| 'BEGIN{print "Accounts-Product|Service Department\n"}
NR==FNR{n=int($2); a[n]=$2; next}a[$1]{print a[$1] FS $2}' SC.lis ext.fmt > outfile

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Store return code of shell script in oracle table

Hi friends, I have to do the following things : 1) there should be a shell script returning the returning the return code of the script. and i have to add some more details like on which machine is has run , at what time and other details and then using plsql i have to add a row to Oracle... (3 Replies)
Discussion started by: sveera
3 Replies

2. UNIX for Dummies Questions & Answers

Need to create .bat file to store log file

Hi guys. Can someone point me to a resource that explains this? Basically these are websphere logs that need to be stored daily, I'm on sunOS 5.8. Each new file stored could have the current time as its filename. The script could be run on a cron which I can set up. I'm just not sure how to write... (0 Replies)
Discussion started by: dirtybrown
0 Replies

3. Shell Programming and Scripting

How to store Data in a File

I want to read a data from a read command and store it in a file...... Plz send me how I can do that Ex: read val and I want to store this val in a file called temp. (2 Replies)
Discussion started by: krishna_sicsr
2 Replies

4. Shell Programming and Scripting

To read and separate number and words in file and store to two new file using shell

hi, I am a begginer in unix and i want to know how to open a file and read it and separate the numbers & words and storing it in separate files, Using shell scripting. Please help me out for this. Regards S.Kamakshi (2 Replies)
Discussion started by: kamakshi s
2 Replies

5. UNIX for Dummies Questions & Answers

How to grep and store in a file

Guys, I was wondering what command can be used to parse the "LaxOrdID" field into a separate file? These messages are in thousands and I need to perform a comparision. (6 Replies)
Discussion started by: DallasT
6 Replies

6. UNIX for Dummies Questions & Answers

Writing a script that will take the first line from each file and store it in an output file

Hi, I have 1000 files names data1.txt through data1000.txt inside a folder. I want to write a script that will take each first line from the files and write them as output into a new file. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

7. Shell Programming and Scripting

Store and isolate bad pages from a file to new file

I have a file like below . The good pages must have 3 conditions : The pages that containing page total only must have 50 lines. The pages that containing customer total only must have 53 lines. The last page of Customer Total should be the last page. How can I accomplish separating good... (1 Reply)
Discussion started by: ehabaziz2001
1 Replies

8. Shell Programming and Scripting

Hit multiple URL from a text file and store result in other test file

Hi, I have a problem where i have to hit multiple URL that are stored in a text file (input.txt) and save their output in different text file (output.txt) somewhat like : cat input.txt http://192.168.21.20:8080/PPUPS/international?NUmber=917875446856... (3 Replies)
Discussion started by: mukulverma2408
3 Replies
X2SYS_GET(1gmt) 					       Generic Mapping Tools						   X2SYS_GET(1gmt)

NAME
x2sys_get - Get track listing from the x2sys track index databases SYNOPSIS
BD(x2sys_get) -TIT(TAG) [ -C ] [ -D ] [ -E ] [ -FIT(flags) ] [ -L[IT(list)] ] [ -NIT(flags) ] [ -Qe|BD(i) ] [ -Rwest/east/south/north[r] ] [ -V ] ] DESCRIPTION
BD(x2sys_get) will return the names of the track data files in the x2sys data base for this TAG that match the given requirements. You may choose a specific region and optionally ask only for tracks that meet certain data criteria. Finally, you may select an option to list all possible pairs that might generate crossovers. -T Specify the x2sys TAG which tracks the attributes of this data type. OPTIONS
No space between the option flag and the associated arguments. -C Instead of reporting the track names, just output the coordinates of the center of each bin that has at least one track with the specified data. -D Only report the track names [Default adds the availability of data for each field]. -E Append the file extension to all reported tracks [no extension]. -F Give a comma-separated list of column names (as described in the definition file) that should all be present within the selected region. [Default selects all data columns]. A track will be included in the returned list if at least one bin reports that the track has all of the listed columns. -L Crossover mode. Return a list of track pairs that should be checked for possible crossovers. The list is determined from the bin- index data base on the assumption that tracks occupying the same bin are very likely to intersect. By default we return all possi- ble pairs in the data base. Append the name of a file with a list of tracks if you want to limit the output to those pairs that involve at least one of the track names in your list. The output is suitable for the -K option in x2sys_cross. -N Give a comma-separated list of column names (as described in the definition file) that all must be absent. A track will be excluded from the returned list if at least one bin reports that the track some all of the listed columns. -Q Append e for external COEs only, and i for internal COEs only [Default is all COEs]. This applies to the crossover setup only and requires -L. -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 limits the tracks to those that fall at least partly inside the spec- ified domain. -V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. EXAMPLES
To find all the tracks associated with the tag MGD77, restricted to occupy a certain region in the south Pacific, and have at least free air anomalies and bathymetry, try BD(x2sys_get) -V -TMGD77 -R180/240/-60/-30 -Ffaa,depth To find all the tracks associated with the tag MGD77 that have depth but not twt, try BD(x2sys_get) -V -TMGD77 -Fdepth -Ntwt To find all the pairs associated with the tag MGD77 that might intersect each other, but only those pairs which involves tracks in your list new.lis, try BD(x2sys_get) -V -TMGD77 -Lnew.lis > xpairs.lis NOTE
The tracks that are returned all have the requested data (-F) within the specified region (-R). Furthermore, the columns of Y and N for other data types also reflect the content of the track portion within the selected region. SEE ALSO
x2sys_binlist(1), x2sys_cross(1), x2sys_datalist(1), x2sys_init(1), x2sys_list(1), x2sys_put(1), x2sys_report(1), x2sys_solve(1) GMT 4.5.7 15 Jul 2011 X2SYS_GET(1gmt)
All times are GMT -4. The time now is 01:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy