When occasionally the services like Apache or MySQL or other rc.d script crashes and stops working, then instead of restarting them manually, it may be more desirable to restart them automatically. A friend of mine asked about such an issue and here is the quick fix bash script fix.
After I installed Fedora 16 x86_64, i needed to install manually Skype for linux, which is available from This link, as it is not in Fedora repositories. After clicking the Skype icon from the kickstart menu, the Skype icon kept bouncing. Skype for linux is not available for 64 bit fedora (till now), and therefore requires 32 bit libraries to run. Problems …
I was using Fedora 15 32 bit for a long time but i felt the need to install a 64 bit edition for some memory limitations in the system. Therefore I downloaded the Fedora 16 x86_64 iso file from https://fedoraproject.org/ . The main concern was to install the new system with minimum mess and reconfiguration. I have separate root and /home partitions so there is no problem in the home directory restoration.
The main problem was to install the packages which i had manually installed with yum after i installed the distro. This is a common problem when upgrading to another distro, and it is worse in Microsoft Windows, as all the applications needs to be downloaded from the corresponding third party sites, and to restore either you need to surf through those sites, or keep the installations in your disk.
mp3 files contain track name, artist name, etc meta data about the music file itself. The meta data format used in mp3 files are called the ID3 tags. There are different versions of ID3 tags available. The objective is to read this meta data information from an mp3 file having an ID3v1 tag.
A detailed overview of the ID3v1 (as well as ID3v2 tags) are done here in this post: What are ID3 Tags all about?. A small ID3v1 library is also implemented (reading and writing tags) in C language here: An ID3v1 Tag Parsing Library. TagLib is available to read and write ID3v1 and ID3v2 tags and is free to use.
Continue reading “Bash Script: Reading ID3v1 Tags”
A file is given, and a string is given. The number of time the string occurs in the file, and the line number in which the string occurs in the file needs to be found out and printed.
Continue reading “Bash Script: Find occurrence count of a string in a file”
This article reviews the GNUSim8085 (v1.3.7) a graphical simulator, assembler and debugger for the Intel 8085 microprocessor.
The Intel 8085 is an 8-bit microprocessor that was launched by Intel in 1977 and hence is something that we have never seen around. So why do we need to learn about the programming model and instruction set of this old microprocessor? The microprocessors we use are all for general-purpose computing but there are other applications of computers such as making automatic solar tracking-panels, automatic power-controls, or security control systems. For such applications, general-purpose CPUs are unnecessary-a waste of resources; a low powered CPU is what we need. The Intel 8085 is one of the candidates. To program this piece of hardware, we first need to know the programming model-the logical structure of the programmable registers, flags, and the instruction set.
I recently had a problem with my Samsung ML-1666 Monochrome laser printer: I could not configure it in Fedora. Simply downloading the driver from Samsung website and installing seemed easy, but actually did nothing.
Googling for hours did not solve the problem, but I kept trying and finally got it working. So I thought I should write down what I did, it may help you.
The objective is to write a shell script to mimic the functions of the wc command. This shell script would be made with bash built-ins and standard coreutils commands, and is made as accurate as possible to mimic wc.
Continue reading “Bash Script: Counting lines, words, characters”
This is a post to present one method to inverse the bit pattern of an input number, the bitwise not operation on a bit pattern. I am presenting one method which i figured out.
Continue reading “Bash Script : Bitwise Not Operation in bash”
Generating prime numbers within a range using bash script. The technique used in this implementation to generate the prime numbers is still the good old divide and check method, but with some tweaks attempting to make the execution a bit better.
The core method is, we check if an integer p is prime by:
- Dividing with integers which are not multiples of 2’s and 3’s
- Dividing with integers upto floor ( sqrt ( p ) )
The integer p itself is needed to be not divisible by 2 or 3 or both.
Read more to get the bash script