Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Reading file and matching it from set of file Post 303004504 by arunkumar_mca on Tuesday 3rd of October 2017 12:29:43 PM
Old 10-03-2017
Yes each line of unmatched will be in any of the set of the file with *.h . I have to take a record from unmatch and find if they are available on 1,8 position on *.h and print the record and the file *.h name where it was found.

I executed the awk. it is giving me the record. How can I get the file name too.
This User Gave Thanks to arunkumar_mca For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

Hi How can i dynamically read files names from a list file and execute them from a single shell script. Please help its urgent Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies

2. UNIX for Advanced & Expert Users

Reading a file and writing the file name to a param file.

Hi All, Not sure if this would be in a dummies sectiin or advanced. I'm looking for a script if someone has doen something like this. I have list of files - adc_earnedpoints.20070630.txt adc_earnedpoints.20070707.txt adc_earnedpoints.20070714.txt adc_earnedpoints.20070721.txt... (1 Reply)
Discussion started by: thebeginer
1 Replies

3. Shell Programming and Scripting

Reading lines in a file matching a pattern

Hi, I need to redirect the lines in a file to a different file if the character starting from 2 to 6 in the line are numerical . Please let me know if anyone have any script to do this. Thanks, Ranjit (4 Replies)
Discussion started by: torenji
4 Replies

4. Shell Programming and Scripting

Searching for Log / Bad file and Reading and writing to a flat file

Need to develop a unix shell script for the below requirement and I need your assistance: 1) search for file.log and file.bad file in a directory and read them 2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file 4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies

5. Shell Programming and Scripting

awk - writing matching pattern to a new file and deleting it from the current file

Hello , I have comma delimited file with over 20 fileds that i need to do some validations on. I have to check if certain fields are null and then write the line containing the null field into a new file and then delete the line from the current file. Can someone tell me how i could go... (2 Replies)
Discussion started by: goddevil
2 Replies

6. UNIX for Dummies Questions & Answers

Reading Xml file and print the values into the text file in columnwise?

hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file <sequence> <Filename>aldorzum.doc</Filename> <DivisionCode>US</DivisionCode> <ContentType>Template</ContentType> <ProductCode>VIMZIM</ProductCode> </sequence>... (4 Replies)
Discussion started by: sravanreddy
4 Replies

7. Shell Programming and Scripting

Shell script to filter records in a zip file that contains matching columns from another file

Not sure if this is the correct forum for this question. I have two files. file1.zip, file2 Input: file1.zip col1, col2 , col3 a , b , 0:0:0:0:0:c436:9346:d40b x, y, 0:0:0:0:0:880:39f9:c9a7 m, n , 0:0:0:0:0:80c7:9161:fe00 file2.txt col1 c4:36:93:46:d4:0b... (1 Reply)
Discussion started by: anil.v
1 Replies

8. Shell Programming and Scripting

Find matching file in bash with variable file names but consisent prefixs

As part of a bash the below line strips off a numerical prefix from directory 1 to search for in directory 2. for file in /home/cmccabe/Desktop/comparison/missing/*.txt do file1=${file##*/} # Strip off directory getprefix=${file1%%_*.txt} ... (5 Replies)
Discussion started by: cmccabe
5 Replies

9. Shell Programming and Scripting

ksh Script, Reading A File, Grepping A File Contents In Another File

So I'm stumped. First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes. I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies

10. UNIX for Beginners Questions & Answers

awk to update file with partial matching line in another file and append text

In the awk below I am trying to cp and paste each matching line in f2 to $3 in f1 if $2 of f1 is in the line in f2 somewhere. There will always be a match (usually more then 1) and my actual data is much larger (several hundreds of lines) in both f1 and f2. When the line in f2 is pasted to $3 in... (4 Replies)
Discussion started by: cmccabe
4 Replies
Prophet::Replica::prophet(3pm)				User Contributed Perl Documentation			    Prophet::Replica::prophet(3pm)

Replica Format
       overview

	$URL
	   /<db-uuid>/
	       /replica-uuid
	       /latest-sequence-no
	       /replica-version
	       /cas/records/<substr(sha1,0,1)>/substr(sha1,1,1)/<sha1>
	       /cas/changesets/<substr(sha1,0,1)>/substr(sha1,1,1)/<sha1>
	       /records (optional?)
		   /<record type> (for resolution is actually _prophet-resolution-<cas-key>)
		       /<record uuid> which is a file containing a list of 0 or more rows
			   last-changed-sequence-no : cas key

	       /changesets.idx

		   index which has records:
		       each record is : local-replica-seq-no : original-uuid : original-seq-no : cas key
		   ...

	       /resolutions/
		   /replica-uuid
		   /latest-sequence-no
		   /cas/<substr(sha1,0,1)>/substr(sha1,1,1)/<sha1>
		   /content (optional?)
		       /_prophet-resolution-<cas-key>	(cas-key == a hash the conflicting change)
			   /<record uuid>  (record uuid == the originating replica)
			       last-changed-sequence-no : <cas key to the content of the resolution>

		   /changesets.idx
		       index which has records:
			   each record is : local-replica-seq-no : original-uuid : original-seq-no : cas key
		       ...

       Inside the top level directory for the mirror, you'll find a directory named as a hex-encoded UUID.  This directory is the root of the
       published replica. The uuid uniquely identifes the database being replicated.  All replicas of this database will share the same UUID.

       Inside the <db-uuid> directory, are a set of files and directories that make up the actual content of the database replica:

       "replica-uuid"
	 Contains the replica's hex-encoded UUID.

       "replica-version"
	 Contains a single integer that defines the replica format.

	 The current replica version is 1.

       "latest-sequence-no"
	 Contains a single integer, the replica's most recent sequence number.

       "cas/records"
       "cas/changesets"
	 The "cas" directory holds changesets and records, each keyed by a hex-encoded hash of the item's content. Inside the "cas" directory,
	 you'll find a two-level deep directory tree of single-character hex digits.  You'll find  the changeset with the sha1 digest
	 "f4b7489b21f8d107ad8df78750a410c028abbf6c" inside "cas/changesets/f/4/f4b7489b21f8d107ad8df78750a410c028abbf6c".

	 You'll find the record with the sha1 digest "dd6fb674de879a1a4762d690141cdfee138daf65" inside
	 "cas/records/d/d/dd6fb674de879a1a4762d690141cdfee138daf65".

	 TODO: define the format for changesets and records

       "records"
	 Files inside the "records" directory are index files which list off all published versions of a record and the key necessary to retrieve
	 the record from the content-addressed store.

	 Inside the "records" directory, you'll     warn "Got types ".join(',',@types);find directories named for each "type" in your database.
	 Inside each "type" directory, you'll find a two-level directory tree of single hexadecimal digits. You'll find the record with the type
	 <Foo> and the UUID "29A3CA16-03C5-11DD-9AE0-E25CFCEE7EC4" stored in

	  records/Foo/2/9/29A3CA16-03C5-11DD-9AE0-E25CFCEE7EC4

	 The format of record files is:

	     <unsigned-long-int: last-changed-sequence-no><40 chars of hex: cas key>

	 The file is sorted in asecnding order by revision id.

       "changesets.idx"
	 The "changesets.idx" file lists each changeset in this replica and provides an index into the content-addressed storage to fetch the
	 content of the changeset.

	 The format of record files is:

	     <unsigned-long-int: sequence-no><16 bytes: changeset original source uuid><unsigned-long-int: changeset original source sequence no><16 bytes: cas key - sha1 sum of the changeset's content>

	 The file is sorted in ascending order by revision id.

       "resolutions"
	 TODO DOC RESOLUTIONS

   BUILD
       Open a connection to the prophet replica source identified by "$self-"url>.

   replica_version
       Returns this replica's version.

   set_replica_version
       Sets the replica's version to the given integer.

   uuid
       Return the replica's UUID

Internals of record handling
   changesets_for_record { uuid => $uuid, type => $type, limit => $int }
       Returns an ordered set of changeset objects for all changesets containing changes to this object.

       Note that changesets may include changes to other records

       If "limit" is specified, only returns that many changesets (starting from record creation).

perl v5.10.1							    2009-12-22					    Prophet::Replica::prophet(3pm)
All times are GMT -4. The time now is 07:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy