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:
1) exclude images under a certain KB size
2) exclude images previous a certain date
3) exclude images in specific folders or sub-folders
4) resize images to precise height (400px for example)
5) crop images (gravity center) transforming into the square image with each side by 400px
6) optimize the image compression ratio
then crop (gravity center) and optimize the result images
But still I don't know how exclude file for size or folder and eventually how to merge the whole in a single script
I'm not a scripting expert, so I ask you if you can help me.
Hi,
I have this following script below. Its searching a log file for 2 string and if found then write the strings to success.txt and If not found write strings to failed.txt . if one found and not other...then write found to success.txt and not found to failed.txt.
I want to optimize this... (3 Replies)
Hi All ,
I am just a new bie in Unix/Linux .
With help of tips from 'here and there' , I just created a simple script to
1. declare one array and some global variables
2. read the schema names from user (user input) and want2proceed flag
3. if user want to proceed , keep reading user... (8 Replies)
I've a script to do some snapshots but the time it does so is very different...
once i got a snapshot under 1 sec, on the other hand it took 3 sec, but nothing else changed, i didnt even move the cursor or something.
I put the script on a ramdisk and its faster, but still swing from under 1... (1 Reply)
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)
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 ./... (1 Reply)
Hi All,
There is a script (test.sh) which is taking more CPU usage. I am attaching the script in this thread.
Could anybody please help me out to optimize the script in a better way.
Thanks,
Gobinath (6 Replies)
Dear Forum experts
I have the below script which I made to run under bash shell, it runs perfectly for low records number, let us say like 100000. when I put all records (3,000,000), it's takes hours
can you please suggest anything to optimize or to run in different way :-|
{OFS="|";... (6 Replies)
Hi,
I need a shell script to determine if a no. is either even, greater than 4, less than 8
SHELL : ksh
OS : RHEL 6
this is the if block of the script
mod=`expr $num % 2`
if || ||
then
echo "No. is either even or greater than 4 or less than 8"
fi
this code works... (2 Replies)
Hello,
I'm wondering if there is a quicker way of doing this.
Here is my mv script.
d=/conversion/program/out
cd $d
ls $d > /home/tempuser/$$tmp
while read line ; do
a=`echo $line|cut -c1-5|sed "s/_//g"`
b=`echo $line|cut -c16-21`
if ;then mkdir... (13 Replies)
Hi All,
I have written a new script to check for DB space and size of dump log file before it can be imported into a Oracle DB.
I'm relatively new to shell scripting.
Please help me optimize this script further. (0 Replies)
Discussion started by: narayanv
0 Replies
LEARN ABOUT DEBIAN
mrename
MRENAME(1) General Commands Manual MRENAME(1)NAME
mrename - program to rename files
SYNOPSIS
mrename 'pattern' prefix [option]
DESCRIPTION
This manual page documents briefly the mrename command. This manual page was written for the Debian GNU/Linux distribution because the
original program does not have a manual page.
mrename is a tool for easy and automatic renaming of many files. The 'pattern' is the pattern to search files to rename (quoted to avoid
that bash resolve it), and prefix is the prefix that will be added to the name of each file. The two alternative options for copying or
moving files in the new name are explained below. All parameters are needed, and you have to stay and launch the script in the same direc-
tory of the files to be renamed. The program should be able to write in this directory.
OPTIONS
There are only the following three options.
-c The option -c will copy each file with the new filename.
-m The option -m will move each file in the new filename.
-h Display help.
EXAMPLE
If you have a directory with two jpeg images prof.jpg and forp.jpg and you want to add them a prefix like item0, item1 etc.. (that is
item0prof.jpg, item1forp.jpg etc..) do this:
cd /path/to/the/images
mrename '*.jpg' item -c
to copy each matching file into another with the new name
mrename '*.jpg' item -m
to rename each file without keeping a copy with the previous name
Word-Wide-Web:
http://alfalinux.sourceforge.net/mrename.php3
AUTHOR :
Giancarlo -rofus- Erra
e-mail: rofus@mindless.com
This manual page was written by Dr. Guenter Bechly <gbechly@debian.org>, for the Debian GNU/Linux system (but may be used by others). It is
distributed under the GPL just like mrename itself.
October 22, 2000 MRENAME(1)