Help - Search - Members - Calendar
Full Version: OT: Debian Help (Bash scripts)
914World.com > The 914 Forums > 914World Garage
bd1308
okay, so i made a bash script:

for img in 'ls *.jpg'
do
convert -resize 800x600 $img resized-$img
done

per some directions from this site....

seemed easy enough....well it doesnt work.

the debian irc network people are no help at all...

i'm trying to resize some pictures...
Gint
Buy a shell scripting book. I can make a recomendation Monday when I'm at work.
bd1308
yeah, i want to learn PHP and bash shell scripts

those are fun.
Gint
This works from a bash command line. I'm not familiar with convert or it's usage syntax, you'll have to figure that part out. I'm not going to write a script for you. THe F1 race is on. And it's my day job and today is Sunday.


bash-2.05b$ ls *.jpg | while read name
> do
> mv $name resized-$name
> done

Or in other words,
bash-2.05b$ ls *.jpg | while read name; do; mv $name resized-$name; done
bd1308
cool man....
scotty914
britt, i have a question for ya. you have almost 3000 posts, how many are on topic. for a person who says things like this :

QUOTE
I feel like sometimes the 914club can get out of hand

Look, I don't like most of the stuff that goes on at that place.......
quoted from your cisco page about the 914 club.

but you seem to be willing to us the 914club to your benifit, why not ask this stuff on a programmer page, not a car page. i have nothing against you at all, but if you dont like this place dont use it. or use it for car stuff, i know you want the sysco forum to be "HUGE" i know you want some experts from here so the cisco forum has a knowledge base besides god. you have said you basicly want the cisco forum to eclipse the 914 club ( not exact wording but the idea ) .

i am not a person who believes that the 914club should be cars only, but i dont think i have seen a post in 3 weeks that you had on topic, besides smart ass comments, which i do some times.

sorry for my off topic
Gint
LOL! Now that's entertainment. But the man makes a valid point. You bashin us on another forum?

Here's another tidbit. Get better at using google. I found a guy's script to do almost exactly what you asked for . It took me less than 60 seconds.

Read this page. Or search for convert in the text.

http://www.stokebloke.com/bash/index.php

#!/bin/bash

for img in *.jpg;
do

export height=`identify -format %h $img`
export width=`identify -format %w $img`
let ratio=$width/$height

echo Image $img = [ $width x $height ] = $ratio

if [ $ratio == 0 ]
then
echo Portrait 0
convert $img -geometry 600x800! -format jpeg -quality 80 $img
else
echo Landscape 1
convert $img -geometry 800x600! -format jpeg -quality 80 $img
fi

done
bd1308
okay, look....

i didn't ask for a long, drawn-out thing about programming or off-topic posts....

as for my post on my board, that comment was concerning a completly different topic altogether....

now as for my 914 posts, I stopped that, becuse I always get yelled at for being stupid....i'm not asking for pity, so don't go there.

If I knew what I was doing, why would I ask questions?
bd1308
but you're right...

only for 914 stuff ....
Gint
QUOTE (bd1308 @ Aug 21 2005, 12:16 PM)
but you're right...

only for 914 stuff ....

Let's not get carried away now. Off topic stuff is what makes this board different, unique and apparently well liked. Maybe if you adjusted your signal to noise ratio a little...
bd1308
what signal??? I have been PROVEN to know nothing about these cars?
Gint
QUOTE (bd1308 @ Aug 21 2005, 12:23 PM)
what signal??? I have been PROVEN to know nothing about these cars?

I guess yer hosed then. laugh.gif
scotty914
but britt you can learn, you did not know how to do an engine drop and now you do, you learned how to do other stuff to your car, like timing and dwell. so you can learn more, just listen and learn.

if you want to see something funny pick almost any older member here and go find them on PP board and go back and read all of their posts. you will find a lot of em had some of the same problems as you have. i personally could not even get my car to start, due to several reasons but dave darling helped me out a lot. now i think i can fix almost any l jet problem, or at least figure out whats wrong.

i had wiring problems, that i could not figure out, then i did. it just takes time.

britt you might want to ask the admins here if they can start a another page on the 914 club site... ie the clean room or what ever where the cisco members can have their own little room here

hijacked.gif
Part Pricer

Hey Britt, when do you go back to school? And, what courses will you be taking?

We need to know so we can be prepared for all of your homework questions. biggrin.gif
bd1308
Statics
Calc II
Physics
etc...

i go back august 27th...

I also like managing a forum and having my server being used...and CISCO was the perfect way to get it to work.

thanks scott.
McMark
QUOTE (bd1308 @ Aug 21 2005, 09:17 AM)
the debian irc network people are no help at all...

You always struck me as a IRC type kid. tongue.gif I'll bet you've got an IRC channel open right now that's just scrolling along.
bd1308
if it weren't for the formatting issues with links, i'd use text-mode linux for everything....


just seems like most webpages now-days arent made for text-mode people.

i like IRC.
smile.gif
rhodyguy
well you sure have me confused now britt. do you mean staTIStics (stats), or do you mean "statics"? what ever that might be.

k
redshift
Britt, I am not on your AIM list anymore... just letting you know, so you won't have to wonder.

I don't like what goes on here either. biggrin.gif

Thanks Scott!

M
scotty914
QUOTE (bd1308 @ Aug 21 2005, 01:13 PM)

as for my post on my board, that comment was concerning a completly different topic altogether....

now as for my 914 posts, I stopped that, becuse I always get yelled at for being stupid....i'm not asking for pity, so don't go there.

If I knew what I was doing, why would I ask questions?

no britt you are just the red headed step child, that is you and your kin Miles.

and for your comment on that being a totally different topic, anyone can go to your site, then the engine bay then the "where do you want this to go" thread and see what you meant.

and no you where only called stupid because you did not listen, you just threw parts at it and did not think it through

not every one can just get these old cars over night, look at miles he has had 914s for many years and he just does not understand all of it. almost every one here has screwed the pooch at least once with their car, but they learned. best thing you can do some times is to step back ask a question, think about it, listen to the answers you get. use the info you got and go from there.

redshift
Yeah, you could do it that way. Or you could just open the dwell up real far, and...

Do you HAVE to use Firefox to ignore?


M
bd1308
you're not on AIM anymore miles???


sigh....

i believe you have to use firefox to ignore people....

red-headed step child laugh.gif

ematulac
Hey Britt,

Try posting your linux questions to LinuxQuestions.org. It's an excellent resource, and that's where I usually ask/answer linux related questions.

Or, use gentoo. Their forums are one of the reasons why I love that distro.

bd1308
thank you

:bows:

gentoo huh? heard some good things, but I don't think IMHO it gets any better than textmode debian...

smile.gif
rhodyguy
the nebulonic vortex is excellent also.

k
ematulac
I ran text mode Gentoo on a very minimal Cyrix C3 box for a long time to host my own personal website. It was more a proof of concept, but it worked great.

The biggest reason I like Gentoo is being able to optimize it for any CPU. The drawback to that is, you have to compile just about *everything*.

I 've never used Debian, so I can't really compare the two. But from what I hear, their package systems are very similar. IIRC, Gentoo was designed to improve on the Debian package system. Gentoo does have a pretty good edge in package availability. If you want to be the first on your block to run the latest packages, Gentoo is the way to go.
bd1308
QUOTE (ematulac @ Aug 21 2005, 10:45 PM)
I ran text mode Gentoo on a very minimal Cyrix C3 box for a long time to host my own personal website. It was more a proof of concept, but it worked great.

The biggest reason I like Gentoo is being able to optimize it for any CPU. The drawback to that is, you have to compile just about *everything*.

I 've never used Debian, so I can't really compare the two. But from what I hear, their package systems are very similar. Gentoo does have a pretty good edge in package availability, though. If you want to be the first on your block to run the latest packages, Gentoo is the way to go.

so I could optimize gentoo to run on my 486/100?

hmmm....
ematulac
I believe so, though I haven't personally tried it.

QUOTE
Support for x86, AMD64, PowerPC, UltraSparc, Alpha and MIPS processors


Check out Gentoo if you are interested.
bd1308
well i was joking...nice to know that is a possibility though.

i'll check it out.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.