Sponsored Content
Top Forums Shell Programming and Scripting Print the overlapping entries in 2 files to separate file Post 302884674 by clx on Tuesday 21st of January 2014 09:46:59 AM
Old 01-21-2014
Sorry but I did not really get the logic. can you specify in terms of specific fields on how did you separate the data sets.
In short, Please elaborate.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Break a file into separate files

Hello I am facing a scenario where I have a file with XML content and I am running shell script over it. But the problem is the XML is getting updated with new services. In the below scenario, my script takes values from the xml file from one service name say ABCD. Since there are multiple, it is... (8 Replies)
Discussion started by: chiru_h
8 Replies

2. Shell Programming and Scripting

extract nth line of all files and print in output file on separate lines.

Hello UNIX experts, I have 124 text files in a directory. I want to extract the 45678th line of all the files sequentialy by file names. The extracted lines should be printed in the output file on seperate lines. e.g. The input Files are one.txt, two.txt, three.txt, four.txt The cat of four... (1 Reply)
Discussion started by: yogeshkumkar
1 Replies

3. Shell Programming and Scripting

awk/sed script to print each line to a separate named file

I have a large 3479 line .csv file, the content of which looks likes this: 1;0;177;170;Guadeloupe;x 2;127;171;179;Antigua and Barbuda;x 3;170;144;2;Umpqua;x 4;170;126;162;Coos Bay;x ... 1205;46;2;244;Unmak Island;x 1206;47;2;248;Yunaska Island;x 1207;0;2;240;north sea;x... (5 Replies)
Discussion started by: kalelovil
5 Replies

4. Shell Programming and Scripting

awk print header as text from separate file with getline

I would like to print the output beginning with a header from a seperate file like this: awk 'BEGIN{FS="_";print ((getline < "header.txt")>0)} { if (! ($0 ~ /EL/ ) print }" input.txtWhat am i doing wrong? (4 Replies)
Discussion started by: sdf
4 Replies

5. UNIX for Dummies Questions & Answers

Awk: Print out overlapping chunks of file - rows 0-20,10-30,20-40 etc.

First time poster, but the forum has saved my bacon more times than... Lots. Anyway, I have a text file, and wanted to use Awk (or any other sensible program) to print out overlapping sections, or arbitrary length. To describe by example, for file 1 2 3 4 5 etc... I want the out put... (3 Replies)
Discussion started by: matfald
3 Replies

6. UNIX for Dummies Questions & Answers

Merge two files with non-overlapping identities

Hi All, I wish to merge two files: file1: with header rsSNP-ID Chromosome Chr-Pos rs171 1 175261679 rs242 1 20869461 rs538 1 6160958 file2: without header disease:AAT deficiency:M0525101 rs1243168 20109307 1 disease:AAT deficiency:M0525101 rs4900229 20109307 1... (3 Replies)
Discussion started by: luoruicd
3 Replies

7. Shell Programming and Scripting

Compare 2 files and print matches and non-matches in separate files

Hi all, I have two files, chap.txt and complex.txt. chap.txt looks like this: a d l m r k complex.txt looks like this: a c d e l m n j a d l p q r c p r m ......... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

8. Programming

Read text from file and print each character in separate line

performing this code to read from file and print each character in separate line works well with ASCII encoded text void preprocess_file (FILE *fp) { int cc; for (;;) { cc = getc (fp); if (cc == EOF) break; printf ("%c\n", cc); } } int main(int... (1 Reply)
Discussion started by: khaled79
1 Replies

9. Shell Programming and Scripting

Identify the overlapping and non overlapping regions

file1 chr pos1 pos2 pos3 pos4 1)chr1 1000 2000 3000 4000 2)chr1 1380 1480 6800 7800 3)chr1 6700 7700 1200 2200 4)chr2 8500 9500 5670 6670 file2 chr pos1 pos2 pos3 pos4 1)chr2 8500 9500 5000 6000 2)chr1 6700 7700 1200 2200 3)chr1 1380 1480 6700 7700 4)chr1 1000 2000 4900 5900 I... (2 Replies)
Discussion started by: data_miner
2 Replies

10. Shell Programming and Scripting

awk to print line is values between two fields in separate file

I am trying to use awk to find all the $3 values in file2 that are between $2 and $3 in file1. If a value in $3 of file2 is between the file1 fields then it is printed along with the $6 value in file1. Both file1 and file2 are tab-delimited as well as the desired output. If there is nothing to... (4 Replies)
Discussion started by: cmccabe
4 Replies
GPSDECODE(1)							GPSD Documentation						      GPSDECODE(1)

NAME
gpsdecode - decode GPS, RTCM or AIS streams into a readable format SYNOPSIS
gpsdecode [-c] [-d] [-e] [-j] [-t typelist] [-u] [-v] [-D debuglevel] [-V] DESCRIPTION
This tool is a batch-mode decoder for NMEA and various binary packet formats associated with GPS, AIS, and differential-correction services. It produces a JSON dump on standard output from binary on standard input. The JSON is the same format documented in gpsd(8); this tool uses the same decoding logic as gpsd, but with a simpler interface intended for batch processing of data files. All sensor-input formats known to the GPSD project can be decoded by this tool. These include: NMEA, AIVDM (the NMEA-derived sentence format used by AIS, the marine Automatic Identification System), RTCM2, and all supported GPS binary formats (notably including SiRF). See gpsd(8) for applicable standards and known limitations of the decoding logic. You can use this tool with nc(1) to examine AIS feeds from AIS pooling services, RTCM feeds from RTCM receivers or NTRIP broadcasters. OPTIONS
The -d option tells the program to decode packets presented on standard input to standard output. This is the default behavior. The -j explicitly sets the output dump format to JSON (the default behavior). The -e option option tells the program to encode JSON on standard input to JSON on standard output. This option is only useful for regression-testing of the JSON dumping and parsing code. The -t accepts a comma-separated list of numeric types. Packets with a numeric AIS, RTCM2, or RTCM3 type are passed through and output only if they match a type in the list. Packets of other kinds (in particular GPS packets) are passed through unconditionally. The -u suppresses scaling of AIS data to float quantities and text expansion of numeric codes. A dump with this option is lossless. The -v enables dumping of textual packets to output as they are received on input, immediately preceding corresponding output. The -c sets the AIS dump format to separate fields with an ASCII pipe symbol. Fields are dumped in the order they occur in the AIS packet. Numerics are not scaled (-u is forced). Strings are unpacked from six-bit to full ASCII The -V option directs the program to emit its version number, then exit. The -D option sets a debug verbosity level. It is mainly of interest to developers. AIS DSV FORMAT
With the -c option, dump lines are values of AIS payload fields, pipe-separated, in the order that they occur in the payload. Spans of fields expressing a date are emitted as an ISO8601 timestamp (look for colons and the trailing Z indicating Zulu/UTC time), and the 19-bit group of TDMA status fields found at the end of message types 1-4 are are dumped as a single unsigned integer (in hex preceded by "0x"). Unused regional-authority fields are also dumped (in hex preceded by "0x"). Variable-length binary fields are dumped as an integer bit length, followed by a colon, followed by a hex dump. SEE ALSO
gpsd(8), gpsctl(1), gpsdctl(8), gps(1), libgps(3), libgpsd(3), gpsprof(1), gpsfake(1), AUTHOR
Eric S. Raymond esr@thyrsus.com. The GPSD Project 13 Jul 2005 GPSDECODE(1)
All times are GMT -4. The time now is 06:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy