01-07-2016
There are several ways to interpret your request that would lead to wildly different suggestions.
- Please tell us what operating system and shell you're using.
- Please show us (in CODE tags) sample patterns.txt file contents.
- Please show us (in CODE tags) sample contents of a couple of files in the /logs directory.
- Please show us (based on the above two requests) exactly what output you're hoping to produce (in CODE tags).
- And please let us know where patterns.txt is located and what the name are for the files in /logs that are to be searched.
- Will you b e running this script on the server containing the /logs directory? If not, what is the server's name and how do you plan to access files from that server?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How do I use the grep command to take mutiple text files in a folder and make one huge text file out of them. I'm using Mac OS X and can not find a text tool that does it so I figured I'd resort to the BSD Unix CLI for a solution... there are 5,300 files that I want to write to one huge file so... (7 Replies)
Discussion started by: coppertone
7 Replies
2. UNIX for Dummies Questions & Answers
I have a couple of things I got stuck on
1)
I have a text file containing 25k search string that I need to search against compressed file. I have used this command but somehow it doesn't seems to use all the search terms.
I have put one search string per line in the txt file (I clean up... (2 Replies)
Discussion started by: m00
2 Replies
3. Shell Programming and Scripting
I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies
5. UNIX Desktop Questions & Answers
Hi
I'm sure there's a way to do this, but I ran out of caffeine/talent before getting the answer in a long winded alternate way (don't ask ;) )
The task I was trying to do was scan a directory of files and show only files that contained 3 values:
I940
5433309
2181
I tried many variations... (4 Replies)
Discussion started by: callumw
4 Replies
6. Shell Programming and Scripting
Hi, every one!
I have a file with multiple strings.
file1
ATQRGNE
ASQGVKFTE
ASSQYRDRGGLET
SPEQGARSDE
ASSRDFTDT
ASSYSGGYE
ASSYTRLWNTGE
ASQGHNTD
PSLGGGNQPQH
SLDRDSYNEQF
I want to grep each string in hundreds of files in the same directory, further, I want to find out the string... (7 Replies)
Discussion started by: xshang
7 Replies
7. Shell Programming and Scripting
Hi,
I have a file containing list of strings like
i:
Pink
Yellow
Green
and I have file having list of file names in a directory
j :
a
b
c
d
Where j contains of a ,b,c,d are as follows
a:
Pink (3 Replies)
Discussion started by: madabhg
3 Replies
8. Shell Programming and Scripting
Hi,
I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command.
Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns.
Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies
9. Shell Programming and Scripting
Hi All,
I want to use egrep on multiple files and the results should be output to multiple files. I am using the below code in my shell script(working in Ksh shell). However with this code I am not attaining the desired results.
#!/bin/ksh
(
a="/path/file1"
b="path/file2"
for file in... (4 Replies)
Discussion started by: am24
4 Replies
10. UNIX for Advanced & Expert Users
Hi Gurus,
I got a small requirement in my script to grep a specific pattern in a zip compressed file which has been created with multiple files.
Sample File: 20180913.zip
$> zipinfo -l 20180913.zip
20180913_file1
20180913_file2
20180913_file3
20180912_file4
20180912_file5... (1 Reply)
Discussion started by: hi.villinda
1 Replies
LEARN ABOUT REDHAT
tiffcmp
TIFFCMP(1) General Commands Manual TIFFCMP(1)
NAME
tiffcmp - compare two TIFF files
SYNOPSIS
tiffcmp [ options ] file1.tif file2.tif
DESCRIPTION
Tiffcmp compares the tags and data in two files created according to the Tagged Image File Format, Revision 6.0. The schemes used for com-
pressing data in each file are immaterial when data are compared-data are compared on a scanline-by-scanline basis after decompression.
Most directory tags are checked; notable exceptions are: GrayResponseCurve, ColorResponseCurve, and ColorMap tags. Data will not be com-
pared if any of the BitsPerSample, SamplesPerPixel, or ImageWidth values are not equal. By default, tiffcmp will terminate if it encoun-
ters any difference.
OPTIONS
-l List each byte of image data that differs between the files.
-t Ignore any differences in directory tags.
BUGS
Tags that are not recognized by the library are not compared; they may also generate spurious diagnostics.
The image data of tiled files is not compared, since the TIFFReadScanline() function is used. A error will be reported for tiled files.
The pixel and/or sample number reported in differences may be off in some exotic cases.
SEE ALSO
pal2rgb(1), tiffinfo(1), tiffcp(1), tiffmedian(1), libtiff(3)
September 26, 1994 TIFFCMP(1)