Subscribe to RSS Subscribe to Comments

Programming stuff: Bash, Linux, SQL and Java

watermarking images with convert

convert is a command line tool from image magick package

This is a script I use for watermarking the images:

#!/bin/sh
for i in $( ls | grep jpg); do
convert $i -font /usr/share/fonts/Plazan.ttf -pointsize 17 -draw "gravity SouthWest translate 12,-10 fill ‘#ECD6B1′text 1,11 ‘MY LOGO’ " -draw "gravity SouthWest translate 0,0 image Over 0,0 0,0 ‘/images/logocompany.png’ " $i
done

I place it inside the folder with the images the are to be marked and run it.

How to count the number of lines

The number of lines in a file
wc -l filename
If you have many files in a folder and you want to count all lines in all files you do:
cat ./*.* | wc -l
or just the log files:
cat ./*.log | wc -l

Based on FluidityTheme Redesigned by Kaushal Sheth Sponsored by Send Flowers