Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Batch Image Conversion
OhLordy
post Jan 31 2003, 05:58 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 31-January 03
Member No.: 390



I am trying to use the convert command on a batch of images using this piece of code that was given to me

for FILE in 'ls *.jpg'
do
convert -size 120x120 $FILE -resize 120x120 new_$FILE
done

and the errors I get are as follows

convert: Unable to open file (ls) [No such file or directory].
convert: Unable to open file (*.jpg) [No such file or directory].
Segmentation fault

Any help that can be provided would be greatly appreciated. smile.gif
Go to the top of the page
 
+Quote Post
kyoshiro
post Feb 2 2003, 03:41 PM
Post #2


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 2-February 03
Member No.: 398



If its a shell script ( bash ) w/ the extension .sh then there might some errors in the script.

Are you typing ./scriptname.sh file.jpg when you run it?
Go to the top of the page
 
+Quote Post
chrism01
post Feb 12 2003, 01:01 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 22
Joined: 12-February 03
Member No.: 435



I'd say you need to make sure you are using backquote (aka backtick) marks (`), NOT single quote marks (').
Backticks make the contents a cmd; single quotes just make it a string.
Its an old (quick'n'dirty) shell programming trick to generate a list of files wink.gif


--------------------
Cheers
Chris
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2017 - 09:00 AM