01-14-2010
@anchal_khare: It's just an example. The rule is if there are a line /dir1/dir2 and other lines which the same as first line plus more "dir*" /dir1/dir2/dir3a, /dir1/dir2/dir3b or /dir1/dir2/dir3a/dir4... then only print /dir1/dir2
---------- Post updated 01-15-10 at 08:51 AM ---------- Previous update was 01-14-10 at 10:11 PM ----------
@Scrutinizer: If I add only one more line /Bicycle (mean it doesn't have sub dir) then it will not be printed out. Do you have another solution ? Thanks
Last edited by camus; 01-14-2010 at 10:02 PM..
8 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi i would like to find out how can i write a procmail rule to filter based on the email content.i was unable to locate any similar threads that does filtering based on the content.would appreciate any pointers. thanks:0
* ^From: Machine1 <machine1@aaa.com>
# i will have a string "machine1.log"... (1 Reply)
Discussion started by: new2ss
1 Replies
2. Shell Programming and Scripting
Hi Everyone , have a nice
i would need a little help on this
i have file which contains blocks such as given below
<hgsdp:msisdn=923228719047,loc;
HLR SUBSCRIBER DATA
SUBSCRIBER IDENTITY
MSISDN IMSI STATE AUTHD
923228719047 410072110070614 CONNECTED ... (3 Replies)
Discussion started by: Dastard
3 Replies
3. Shell Programming and Scripting
I have a .kml file. So I want filter the .kml to get only the tags that have this numeric codes that they are in a text file
11951
11952
74014
11964
11965
11969
11970
11971
11972
60149
74018
74023
86378
11976
11980
11983
11984
11987 (5 Replies)
Discussion started by: pcoj33
5 Replies
4. UNIX for Dummies Questions & Answers
I want to view a file ignoring mutilple comment line (/*....*/). Please help me on this.
Advance thanks.:b: (5 Replies)
Discussion started by: Pradipta Kumar
5 Replies
5. Shell Programming and Scripting
Hi,
I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C.
Thanks a lot!!
Here is a sample of my question.
e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Discussion started by: dirkaulo
3 Replies
6. Shell Programming and Scripting
hi all,
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
7. UNIX for Dummies Questions & Answers
Hi Folks,
I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file.
bash scripting is what i need.
Data.txt
Name OrderID Quantity
Sam 123 300
Jay 342 498
Kev 78 2500
Sam 420 50
Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies
8. Shell Programming and Scripting
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
ZDIFF(1) BSD General Commands Manual ZDIFF(1)
NAME
zcmp, zdiff -- compare compressed files
SYNOPSIS
zcmp [options] file [file2]
zdiff [options] file [file2]
DESCRIPTION
zcmp and zdiff are filters that invoke cmp(1) or diff(1) respectively to compare compressed files. Any options that are specified are passed
to cmp(1) or diff(1).
If only file1 is specified, it is compared against a file with the same name, but with the extension removed. When both file1 or file2 are
specified, either file may be compressed.
Extensions handled by gzip(1):
o z, Z,
o gz,
o taz,
o tgz.
Extensions handled by bzip2(1):
o bz,
o bz2,
o tbz,
o tbz2.
Extensions handled by xz(1):
o lzma,
o xz,
o tlz,
o txz.
ENVIRONMENT
TMPDIR Directory in which to place temporary files. If unset, /tmp is used.
FILES
/tmp/zcmp.XXXXXXXXXX Temporary file for zcmp.
/tmp/zdiff.XXXXXXXXXX Temporary file for zdiff.
SEE ALSO
bzip2(1), cmp(1), diff(1), gzip(1), xz(1)
CAVEATS
zcmp and zdiff rely solely on the file extension to determine what is, or is not, a compressed file. Consequently, the following are not
supported as arguments:
- directories
- device special files
- filenames indicating the standard input (``-'')
BSD
May 23, 2011 BSD