Linux

Shell script utility to read a file line by line

#!/bin/bash # # Shell script utility to read a file line line version 2 # This is simpler version of readline script # This script also demonstrate how to process data file # line by line and then separate line in fields, so that # you can process it according to your need. # # […]

Read More
Linux

Reverse text content in file

#!/bin/bash # Bash shell script to reverse text file contain i.e. concatenate files and # print on the standard output in reverse. This script also demonstrate how # to use arrays under bash shell script. FILE=”$1″ if [ $# -eq 0 ]; then echo “$(basename $0) – file-name” exit 1 fi textArray[0]=”” # hold text […]

Read More