What is a built-in command in Linux?

A builtin command is a Linux/Unix command which is "built into a shell interpreter such as sh, ksh, bash, dash, csh etc". Thats where the name came from for these built-in commands. In other words we can say that these commands will always available in RAM so that accessing them is bit fast when compared to(…)

Linux Shell script to rename files from CAPS to small letters

This is a small script to rename multiple files from CAPITAL to small letters. Ok, why we require to do this? Recently we bought a new cam which is naming all photos in capital and it is very much difficult for me to change extension of these photos from caps to small to re-size/modify photos(…)

Linux Shell script to close/open ports on a firewall/Iptables

This is a small script which will takecare of blocking and unblocking ports by asking user about his desire. Just copy this code to your system and change permissions and start executing it. #!/bin/bash #Author: Surendra Anne([email protected]) PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin clear echo -e “############################nnnPresent ports opened on this machine are $(iptables -nL INPUT | grep ACCEPT |(…)

PFOTD: Python ord() function examples

Today our inbuilt function is ord() which is useful for converting a single character to its corresponding ASCII value. Need of ord() function in Python: Some times it is require to convert a string to unicode ASCII value and this inbuilt function will give python this capability. ord() function syntax: ord(‘char’) Examples: Let us start(…)

PFOTD: Python chr() function example

Today our in-built function is chr() which is useful for converting an ASCII value to its corresponding character. Need of chr() function in Python: Some times it requires to convert an unicode ASCII value to its character and this in-built function will give python this capability. Python chr function Syntax: chr(number) Examples: Let us start(…)

Python built-in functions series at Coding Mania started

Hi all,         Today we are starting a series on Python programming called Python Function OF The Day(PFOTD) to show you all how we can use these built-in functions to enrich your python capabilities. The concept of this series is simple, learning a simple python built function for one day. We have(…)

Linux/Unix Shell scripting: Convert video file to gif image in Linux

This is a small script which will convert your video file into a gif file so that we can share it across Internet so that video player is not required to play it. The script is written in Linux Bash shell #!/bin/bash#Author: Surendra Anne([email protected])#Purpose: To convert any video file into a GIF image file. The script will take one video file(…)

[SED]: Remove repeated/duplicate words from a file in Linux

In this post we will see how to delete repeated words. There is a human tendency to write fast and and when we try to review our writing we will find repeated words side by side. If you observe I written “and” two times. This is human mind tendency to process before we write actual(…)

Vi editor: Delete matched search pattern from a file

1) How can I search for a word and delete that matched word in vi editor? This is bit tricky question. With SED its bit easy to do. In vi editor too we can search for a word and delete it with some trick. Delete matched search term from a file Step1: Go to command(…)

AWK Scripting: Learn AWK Built-in variables with examples

AWK inbuilt variables: FS, OFS, RS, ORS, NR, NF, FNR, FILENAME AWK is supplied with good number of built-in variables which come in handy when working with data files. We will see each AWK built-in variables with one or two examples to familiarize with them. Without these built-in variables it’s very much difficult to write simple AWK(…)