Sponsored Content
Top Forums Shell Programming and Scripting find common elements in 2 files (for loop) Post 302142711 by ibking on Monday 29th of October 2007 08:49:49 AM
Old 10-29-2007
thanks!
that worked perfectly
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To find all common lines from 'n' no. of files

Hi, I have one situation. I have some 6-7 no. of files in one directory & I have to extract all the lines which exist in all these files. means I need to extract all common lines from all these files & put them in a separate file. Please help. I know it could be done with the help of... (11 Replies)
Discussion started by: The Observer
11 Replies

2. Shell Programming and Scripting

Files common in two sets ??? How to find ??

Suppose we have 2 set of files set 1 set 2 ------ ------ abc hgb def ppp mgh vvv nmk sdf hgb ... (1 Reply)
Discussion started by: skyineyes
1 Replies

3. UNIX for Dummies Questions & Answers

how to find common words and take them out from two files

Hi, everyone, Let's say, we have xxx.txt A 1 2 3 4 5 C 1 2 3 4 5 E 1 2 3 4 5 yyy.txt A 1 2 3 4 5 B 1 2 3 4 5 C 1 2 3 4 5 D 1 2 3 4 5 E 1 2 3 4 5 First I match the first column I find intersection (A,C, E), then I want to take those lines with ACE out from yyy.txt, like A 1... (11 Replies)
Discussion started by: kaixinsjtu
11 Replies

4. Shell Programming and Scripting

Script to find NOT common strings in two files

Hi all, I'd like you to help or give any advise about the following: I have two (2) files, file1 and file2, both files have information common to each other. The contents of file1 is a subset of the contents of file2: file1: errormsgadmin esdp esgservices esignipa iprice ipvpn irm... (18 Replies)
Discussion started by: hnux
18 Replies

5. UNIX for Dummies Questions & Answers

Writing a loop to merge multiple files by common column

I have 100 data files labelled 250.1.txt through 250.100.txt. The second column of the data files partially match (there is about %90 overlap). Each data file has 4 columns. I want the merge all these text files by the matching values in the second column. In the output, the first column should... (1 Reply)
Discussion started by: evelibertine
1 Replies

6. Shell Programming and Scripting

Find Common Values Across Two Files

Hi All, I have two files like below: File1 MYFILE_28012012_1112.txt|4 MYFILE_28012012_1113.txt|51 MYFILE_28012012_1114.txt|57 MYFILE_28012012_1115.txt|57 MYFILE_28012012_1116.txt|57 MYFILE_28012012_1117.txt|57 File2 MYFILE_28012012_1110.txt|57 MYFILE_28012012_1111.txt|57... (2 Replies)
Discussion started by: angshuman
2 Replies

7. UNIX for Dummies Questions & Answers

Merging tables: identifiying common and unique elements

Hi all, I know how to merge two tables and to remove the duplicated lines based on a field (Column 2) . My next challenge is to be able to identify in a new column those common elements between table A & B, those elements in table A not present in table B and vice versa. A simple count would be... (6 Replies)
Discussion started by: lsantome
6 Replies

8. Shell Programming and Scripting

Count common elements in a column

HI, I have a 3-column tab separated column (approx 1GB) in which I would like to count and output the frequency of all of the common elements in the 1st column. For instance: If my input was the following: dot is-big 2 dot is-round 3 dot is-gray 4 cat is-big 3 hot in-summer 5 My... (4 Replies)
Discussion started by: owwow14
4 Replies

9. Shell Programming and Scripting

Find common files between two directories

I have two directories Dir 1 /home/sid/release1 Dir 2 /home/sid/release2 I want to find the common files between the two directories Dir 1 files /home/sid/release1>ls -lrt total 16 -rw-r--r-- 1 sid cool 0 Jun 19 12:53 File123 -rw-r--r-- 1 sid cool 0 Jun 19 12:53... (5 Replies)
Discussion started by: sidnow
5 Replies
cvmkfile(1)                                                        cvmkfile(1)

NAME
cvmkfile - Create a pre-allocated file SYNOPSIS
cvmkfile [-k <key>] [-p] [-s] [-w] [-z] <size>[k|m|g] <filename> DESCRIPTION
cvmkfile can be used to pre-allocate a file on the Xsan volume. This is useful and preferable when preparing a file for use in a real-time or streaming environment as the entire file is represented in only one file system extent. Additionally, a file can be placed onto a specific storage pool by specifying the <key> value, which is used as the affin- ity locator. See cvfs_config(4) for more details about affinities. USAGE
The -k <key> optionally tells the file system where to place the data file. If an Affinity Key is specified, the file is placed on storage pools that are specified to support this key. If there is no storage pool with the key specified, then the file is placed in non-exclusive data pools. If there are no non-exclusive data pools, then ENOSPC (no space) is returned. The -p option forces the allocation and any subsequent expansions to be fitted "perfectly" as multiples of the InodeExpandMin configuration parameter. The allocation extent will always line up on and be a per- fect multiple of the blocks specified in InodeExpandMin. The -s option forces the allocation to line up on the beginning block modulus of the storage pool. This can help performance in situations where the I/O size perfectly spans the width of the storage pool's disks. The -w option sets the file size to be equal to <size>. Without this option the blocks are allocated but the size is set to zero. NOTE: Unless the -z option is used, the new file will contain undefined data. Using the -w option is not recommended unless absolutely needed. The -z option causes the file to be physically zeroed out. This can take a significant amount of time. The <size> argument specifies the number of bytes, kilobytes(k), megabytes(m) or gigabytes(g) to allocate for the file. There is no guarantee that all requested space will be allocated. If there is insufficient contiguous available space to satisfy the requested amount then a "best effort" will be performed. In this case a success value is returned even though not all of the requested amount is allocated to the file. Even though the allocation may not be fully satisfied, if the -w option is specified then the file size will still reflect the requested <size> value. EXAMPLES
Make a file of one gigabyte with zero length. Allocate it on a storage pool that favors the media type 6100_n8. rock # cvmkfile -k 6100_n8 1g foobar SEE ALSO
cvfs_config(4), cvmkdir(1) Xsan File System December 2005 cvmkfile(1)
All times are GMT -4. The time now is 06:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy