Just a simple script for phone numbers/addresses. No way to add to the flat file yet.... but it is easy to search
Code:
#!/bin/bash
#
##########################
# USA Linux Users Group #
# http://www.usalug.org #
# http://bashscripts.org #
##########################
#######################################################
# baps - Bash Address & Phone-number Scripts #
#######################################################
#
#
# FILE: baps
# VERSION: See variable below
# DATE: See variable below
#
# AUTHOR: Crouse - Please visit bashscripts.org and usalug.org
#
#
########################################################
######################
# Start of Variables #
######################
#
#
#########################################################
##
baps_version="0.1.0" ##
revision_date="Modified October 21, 2005" ##
author="Created by: Dave Crouse" ##
##
#########################################################
#
#
######################
# End of Variables #
######################
headerfile ()
{
clear; echo "
(B)ash (A)ddress and (P)hone (S)cripts
baps - Version $baps_version ";
mkdir -p ~/.baps; touch ~/.baps/addressandphone.data; touch ~/.baps/temp.data;
echo "*****************************************************"; nl -ba ~/.baps/temp.data;
echo "*****************************************************";
}
while true; do headerfile; cat /dev/null > ~/.baps/temp.data
read -p "Search for : " searchforthis
if [[ $searchforthis != "" ]]
then
grep -i "$searchforthis" ~/.baps/addressandphone.data > ~/.baps/temp.data
headerfile
else
echo ""
echo "Sorry, you must enter something to search for!"
read -p "Hit any key to continue. " temp
fi
done; exit