07-28-2011
Find/Grep Syntax Question
Hi Folks,
I am trying to dig through about 100 directories that have 1 or 2 .jpg images stored in each. I want to copy the .jpg to another file in the root directory. Really my ultimate goal is not to have to dig down into each directory to copy the images individually. I thought I could use a find | grep *.jpg -exec cp ./Images {} \;
obvously, that syntax is incorrect.
I am using a mac and I believe the shell is Korn.
Thanks--
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello, I am trying to search a directory for all files matching "G*" without looking in sub-directories "success" and "error". I've searched this forum and found the following syntax, but can't make it work:
find . \( ! -name success -prune -name error -prune \) -type f -name "G*"
Have... (6 Replies)
Discussion started by: alexkav
6 Replies
2. Shell Programming and Scripting
Hi,
I need to extract information from a 4 GB file based on the following conditions:
1) Check for the presence of a set of account numbers
Each account number is present along with other information within
a PAGESTART and PAGEEND.
The file looks like this:
PAGESTART
ACCOUNT NO 123... (6 Replies)
Discussion started by: kthri
6 Replies
3. Shell Programming and Scripting
I wanna grep for a pattern logs 1 2 & 3 within a folder containing 100 logs
grep "test" /folder/log1 /folder/log2 /folder/log3
The above command will work fine
but is there any command like
grep "test" /folder/log1, log2, log3 or something similar (4 Replies)
Discussion started by: roshanjain2
4 Replies
4. Shell Programming and Scripting
Hi All,
Can i use find command to know given date files? If yes, then please let me know the syntax for the same.
Thanks in advance for your postive responses
Regards,
Bachegowda (3 Replies)
Discussion started by: bache_gowda
3 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide.
ls -aLl /bin | grep "\(x\)"
Which works, just highlights 'x' where ever, when ever.
I'm trying to to get (?:) to work but... (4 Replies)
Discussion started by: MykC
4 Replies
6. Shell Programming and Scripting
Alrighty, I'm trying to get a perl script going to search through a bunch of files for me and compile it to a single location. I am currently having troubles on just getting the grep to work.
Here is what I currently have:
#!/usr/bin/perl
open (LOG, "errors.txt") or die
("Unable to open... (2 Replies)
Discussion started by: adelsin
2 Replies
7. Shell Programming and Scripting
My current code is:
user@ubuntu:~/Desktop$ grep -e "\(packaged by\)\|\(employee\)\|\(file name\)\|\(Total Data (MB) Read\)\|\(Begin Time\)" log.txt
packaged by = Ron Mexico
employee = Michael Vick
file name = Mike_Vick_2011.bat
Total Data (MB) Read: 11.82
Begin Time: 6/13/2011... (8 Replies)
Discussion started by: chipperuga
8 Replies
8. UNIX for Dummies Questions & Answers
I am trying to find files that have lines in them that end in an r. I have been able to locate files by using the following command:
find . -type f -name "*RECORDS"| xargs grep -l r$
However, I now want to find files that don't end in r anywhere. That means that no sentences or lines in... (9 Replies)
Discussion started by: newbie2010
9 Replies
9. Shell Programming and Scripting
Dear Team
/app/Appln/logs/
echo Session used server are 'grep -i pid|grep -i session | cut -d'.' -f1 | awk '{print $9}' | sort | uniq'
Output -
lxserver01
lxserver02
lxserver03
When I grep session pid in logs server details I can see above distinct server details but I... (6 Replies)
Discussion started by: skp
6 Replies
10. UNIX for Beginners Questions & Answers
I have a question to this command
find . -type f -name ".*txt" -exec grep "text" {}\.
The find command will locate a file name with the extension of txt once per round and find the word "text" in the content of the file or the find command will locate all the file names with the extension of... (2 Replies)
Discussion started by: TestKing
2 Replies
LEARN ABOUT SUSE
pfsinhdrgen
pfsinhdrgen(1) General Commands Manual pfsinhdrgen(1)
NAME
pfsinhdrgen - Create a pfs stream with different exposures defined by hdrgen script.
SYNOPSIS
pfsinhdrgen <sample.hdrgen>
DESCRIPTION
This program reads files defined in given hdrgen script and outputs them in a PFS stream. Each frame has a tag BV with corresponding
brightness value (APEX standard). Larger BV corresponds to less exposure (darker image), necessary to capture a bright scene.
The generated PFS stream is to be used with photo-metric calibration software and with generators of HDR images.
HDRGEN script file is a plain text file in which each line contains: <path_to_an_image> <inverse_of_exposure_time_in_seconds> <aper-
ture_size> <iso_speed> 0
In most cases it is convenient to use the jpeg2hdrgen program to create such a file automatically. In case it could not parse the exif
information from jpeg files, it is necessary to create this file by hand. Below are the sample contents of such file:
<--- cut here: sample.hdrgen /var/tmp/images/img08.jpg 4 2.8 100 0 /var/tmp/images/img09.jpg 58.8235 2.8 100 0 /var/tmp/images/img10.jpg
76.9231 2.8 100 0 /var/tmp/images/img11.jpg 322.581 2.8 100 0 /var/tmp/images/img12.jpg 400 2.8 100 0 <--- cut here: sample.hdrgen
EXAMPLES
pfsinhdrgen sample.hdrgen | pfsview
View exposures defined in sample.hdrgen script.
SEE ALSO
jpeg2hdrgen(1) pfshdrcalibrate(1)
BUGS
Please report bugs and comments on implementation to Grzegorz Krawczyk <gkrawczyk@users.sourceforge.net>.
pfsinhdrgen(1)