How can I patch a script on a Linux system?

“linux how to patch sample script”

Well, patching is simple. Consider the following scenario: we have a script file named script.pl to which we need to make changes, save them in the patch. We start by copying the original file to the working file with the command cp script.pl script-my.pl . Then we do whatever changes we want in file script-my.pl . Then we run a command diff -u script.pl script-my.pl > script-my.diff . At this time, file script-my.diff contains the changes that we made to the original script.pl . In case we want to distribute our changes to someone else, we just send them the script-my.diff file and those people need to run a single command like patch < script-my.diff to have a copy of the script.pl file identical to our script-my.pl . More information can be obtained from reading the Linux manual pages for diff and patch with commands man diff and man patch on any Linux system.

What does the name Leonid mean?

“leonid as a name”

According to this site, “Leonid” means “lion”. This site says that “LEONARD: From French form of Old German name meaning “bold as a lion.” Variants and diminutives include Lee, Len, Lenard, Lennard, Lennerd, Lennie, Lenny, Leo, Leon, Leonardo, Leonerd, Leonhard, Leonid, Leonidas, Leonides, Lonnard, and Lonny.”.

Where can I find a sample configuration file for mutt email client?

“sample mutt configuration file”
“.muttrc configuration”
“.muttrc configuration files”

There are few sample mutt configuration files (aka muttrc or .muttrc) on Mutt website. Here is a link to the appropriate section of the site. If those are not accessible for any reason, checking /etc/Muttrc on UNIX/Linux hosts might be a good start.

Automatic rotation of images from digital cameras

Some of today’s digital camera have a gravitation sensor built in. With an option in the menu, it is possible to force these cameras to note which way was the camera when the image was taken. Usually, ‘Orientation: ‘ EXIF header is added to the JPEG image. Read on to find out how you can use this information. Continue reading Automatic rotation of images from digital cameras

Calculator at hand

UNIX shell is excellent. The toolbox at hand also never stop to amaze. But sometimes there is this feeling that something is missing. No matter how many tools are there, you’ll still want something special and personalized.

I am pretty often missing the calculator. Of course, there are xcalc and kcalc for graphical interface, but that’s just too slow for something that I should actually do in my head. There is bc(1) for console, but I never liked it for quick stuff. expr(1) is pretty close, but it needs a rather complex syntax like “expr 1 ‘+’ 2”.

Continue reading Calculator at hand