Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am still very newbish in Linux. These bashes are too complicated for me since I want something a little more advance. Is there a renamer application I can use?
Could you be more descriptive? If you just want to rename a bunch of jpeg's from:
0001.jpg
0002.jpg
To:
1.jpg
2.jpg
OR
Do you want to rename a bunch of mp3's with names like:
So you want to eat a burger.mp3
I love cheeseburgers.mp3
Mozerella is the best cheese on cheeseburgers.mp3
echo "New resolution for pictures in this directory (e.g. 640x480):"
read resolution
if [ -z $separator ];then separator="-";fi
for filename in *.$extension
do
convert -verbose -geometry $resolution "$filename" "$resolution-$filename"
done
This script can be easily modified to do any other image modifications automatically. See "man convert" for options.
All you need for your specific job is this (backup the pictures first!). Save it to a file, change permissions to execute (chmod 755 filename) and run in the directory where you have the images stored.
#!/bin/bash
# this should work, backup the images first!
for filename in *.jpg
do
mv "$filename" "mypic$filename"
done
blah, blah...
hecking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
[cyberian@localhost ImageMagick-6.1.6]$ make
make: *** No targets specified and no makefile found. Stop.
[cyberian@localhost ImageMagick-6.1.6]$ su
Password:
[root@localhost ImageMagick-6.1.6]# make install
make: *** No rule to make target `install'. Stop.
[root@localhost ImageMagick-6.1.6]#
If you want to compile and install Imagemagick from source, then you'll need a compiler, eg. gcc, and all of the dev. libraries listed in your error messages. The simplest thing to do, of course, would be to just download the Imagemagick rpm's from your local mirror, cd or dvd installation disks.
Incidentally, you'll only need Imagemagick for the *first* of basileus' scripts. If you only want to rename them (eg. second script) then you won't need it.
If you've installed Imagemagick correctly from a (binary) rpm, then all you have to do to run it from the command line is to type one of convert, display, animate, import, conjure... et. al with the appropriate arguments. See the Imagemagick man page for details - it's a brillo program.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.