03-27-2009
find jpg's mkdir script help
I am having a problem getting this to work right. The script needs to search through directories and subdirectories. If a jpg is found then create a folder in that directory, so on and so forth. Here is what I have so far but it doesn't work right. Help please
#!/bin/bash
for d in `find ./ -type d`;
do
cd $d;
for f in *.{jpg,JPG};
do
mkdir jpgdir;
done;
cd -;
done;
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
System: Ubuntu Intrepid Ibex
I'm running webcamd as a sort of "security" program, but I need a script that will archive my webcam.jpg files.
So, take the following file:
/home/slag/www/webcam.jpg
Rename it--preferably with a time stamp.
Place it in say:
/home/slag/www/history/
... (4 Replies)
Discussion started by: robfindlay
4 Replies
2. Shell Programming and Scripting
ftp script doesn't download jpg properly
The downloaded files have color splotches
Here is the script:
ftp -n me@institute.edu <<END_SCRIPT
quote user name
quote pass password
prompt
mget *.jpg
quit
END_SCRIPT
exit 0
cd ../ (2 Replies)
Discussion started by: walforum
2 Replies
3. Shell Programming and Scripting
Hi,
I have a large series of directories and subdirectories with many jpgs in them. I need to do two things:
1. Create a copy of each jpg found within it's own subdirectory
2. Rename this copied jpg such that apple.jpg becomes apple_m.jpg
I have tried to run the following commands in... (1 Reply)
Discussion started by: atharvan13
1 Replies
4. Shell Programming and Scripting
Hi,
I have all my pictures as *.JPG and *.CR2 in the following folder structure:
/media/a_2TB/pictures/year/year-month-day-hour/picture*.*
But sometimes I added a subdirectory -->
/media/a_2TB/pictures/year/year-month-day-hour/suba/picture*.*... (3 Replies)
Discussion started by: 8200
3 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I'm pretty new to scripting and trying to do a simple (well, I thought so) administrator task. I'm using bash.
I want to create 10 directories under the one directory and apply permissions at the same time.
I've worked out the make directories part: mkdir /userdata/folder{1..50}... (7 Replies)
Discussion started by: jimothy007
7 Replies
6. Shell Programming and Scripting
Dear Team,
Can any one please let me know, if there is any way to create pdf of a Jpg image file in shell script.
I work on Solaris, Korn Shell.
Currently we are using sunpcl2pdf.exe to create PDF from PCL(Printer Control Language) files.
But we are searching for some different way to... (2 Replies)
Discussion started by: Uttam Maji
2 Replies
7. Shell Programming and Scripting
I have a file with lines like:
111 12 7
111 13 8
112 12 9
115 31 3
120 31 9
123 10 7
125 12
I want to make a script which, split the first column into parts (101-110, 111-120...), and make directories for its part with name (101-110, 111-120...) Also i want in every directory include... (7 Replies)
Discussion started by: efsarantis
7 Replies
8. UNIX for Beginners Questions & Answers
I want to find all jpg files and then sort them by modification date. This is where I started.
find . -type f -name "*.jpg"
I tried to pipe a sort in there but that did not seem to work. Do I need to use xargs? (10 Replies)
Discussion started by: cokedude
10 Replies
9. Shell Programming and Scripting
Hi Friends,
I'm trying to create a script that allows me to recursively resize, crop (holding the center of the image) and optimize images jpg, jpeg, png for a specific folder and subfolder with the ability to exclude certain folder and its subdirectory.
Again, I should to do with this script:... (3 Replies)
Discussion started by: danjde
3 Replies
10. Shell Programming and Scripting
Importing images from a camera (or two).
I sort by date (1901 this month).
Currently (failing)
if ]
then
echo "Found Panasonic G9X"
#echo "List files on camera"
#ls ${pana}/*
. chxdir.sh ${photos}/$mn
I want to change directory to a fixed base ($photos)/$mn... (10 Replies)
Discussion started by: dpawson
10 Replies
LEARN ABOUT DEBIAN
puzzle-diff
PUZZLE-DIFF(1) PUZZLE-DIFF(1)
NAME
puzzle-diff - Compare pictures with libpuzzle
SYNOPSIS
[-b <contrast barrier for cropping>] [-c] [-C <max cropping ratio>] [-e] [-E <similarity threshold>] [-h] [-H <max height>] [-l <lambdas>]
[-n <noise cutoff>] [-p <p ratio>] [-t] [-W <max width>] <file 1> <file 2>
DESCRIPTION
puzzle-diff compares two pictures and outputs the normalized distance.
Try puzzle-diff -h for more info.
EXAMPLES
Output distance between two images:
$ puzzle-diff pic-a-0.jpg pics-a-1.jpg
0.102286
Compare two images, exit with 10 if they look the same, exit with 20 if they don't (may be useful for scripts):
$ puzzle-diff -e pic-a-0.jpg pics-a-1.jpg
$ echo $?
10
Compute distance, without cropping and with computing the average intensity of the whole blocks:
$ puzzle-diff -p 1.0 -c pic-a-0.jpg pic-a-1.jpg
0.0523151
AUTHORS
Frank DENIS libpuzzle at pureftpd dot org
SEE ALSO
libpuzzle(3), puzzle_set(3)
2012-05-09 PUZZLE-DIFF(1)