Category Archives: Linux / Unix Shell

Linux and Unix commands , and shell programming

Bash Script: Reading ID3v1 Tags

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 … Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , , | Leave a comment

Bash Script: Find occurrence count of a string in a file

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.

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

Bash Script: Counting lines, words, characters

Objective 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.

Posted in Computer Science, Linux / Unix Shell | Tagged , , | 5 Comments

Bash Script : Bitwise Not Operation in bash

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.

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

Bash Script: Generating Primes within Range

Objective 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 … Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

awk to the rescue

Some days back I got a collection of 100 Greatest Piano Works cd collection. The first thing I did was to rip the CD in flac and preserve a lossless copy of the disks. Then I converted those to ogg … Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

Read multiple arguments in bash script

A shell script is written to achieve a purpose, and it is very helpful is the shell script takes multiple commandline arguments and then operate on each argument, instead of execute the shellscript multiple times. This post will talk about how to make the shell script work with multiple arguments. Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , | 1 Comment

Bash Script : Print lines of a file in reverse order

A bash script to print the lines of a file in reverse order. Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , | 12 Comments

Bash Script : Finding Digital Root of an Integer

A bash script to find the digital root of an integer Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

Bash Script : Check for palindrome

A simple problem: To find if a string is a palindrome or not using Bash script Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment