Skip to main content

Generate ASCII Table Using Bash Programming

Hello Friends,



Welcome Again To My Blog. Today, I am going To Share With You Another Simple Bash Script. Well I'm hoping that You already aware about ASCII Table. If Not, Please Use Google. Well,  Today's Script Will Demonstrate How Bash Script Can Easily Generate Good Looking ASCII Table In Few Lines.

This Bash Script is really very to Understand and By The Way, For Completely New Bies, I had Used Good Comments Lines To Make This Script More Easy To Understand.

To Run This Script

chmod +x path_to_script.sh

./path_to_script.sh

Generate ASCII Table Using Bash Script




#!/bin/bash
#
#
# Author :
# Suraj Singh Bisht
# surajsinghbisht054@gmail.com
# www.bitforestinfo.com
# github.com/surajsinghbisht054
#
#
# ====================================================
#         Please Don't Remove Author name
# ====================================================
#
#
# Description:
#  ASCII Table Print Bash Script

# Welcome Banner For Script
printf "#############################################################\n" > /tmp/$0
printf "                       ASCII TABLE \n" >> /tmp/$0
printf "#############################################################\n" >> /tmp/$0
printf "                         |      Suraj Singh Bisht            \n" >> /tmp/$0
printf "                         |      surajsinghbisht054@gmail.com \n" >> /tmp/$0
printf "                         |      www.bitforestinfo.com        \n" >> /tmp/$0
printf "[------------------------------------------------------------]\n" >> /tmp/$0
printf "[       Use q To Exit, And Arrow UP and Down To Scroll       ]\n" >> /tmp/$0
printf "[------------------------------------------------------------]\n" >> /tmp/$0
# table row format to print
format="%-10d | %-10x | %-10o | %s"

# table column heading format
printf "%-10s | %-10s | %-10s | %-10s\n" Digit Hexadecimal octadecimal Char >> /tmp/$0

# table divider line
printf '==============================================\n' >> /tmp/$0

# loop 1 to 175
for num in $(seq 1 175) 
do 
 printf "$format\n" $num $num $num $(printf '\x'$num) >> /tmp/$0 
done
# show complete output and pipe it into less command tool
cat /tmp/$0 | less



 For More Updated Example, Check Github Here

Related Post

Top Visited

Big List Of Google Dorks For Sqli Injection

how to install burp suite in Linux/Ubuntu 16.04

Create Simple Packet Sniffer Using Python

Create Ping Sweeping Script Using Python

Python Beautiful Soup Module - Tutorial - Part 2

how to configure burpsuite with firefox?

Latest Google Dorks List

List of Keyboard Shortcuts Keys for GNOME Desktop (Kali linux / Linux / Ubuntu/*nix )

What is Burp Suite And its Features?

What is the use of Pseudo header in TCP/UDP packets?