All pastes #733257 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-11 17:37 UTC
rendered paste body

#!/bin/bash
#
# Let's try this again
#
function add() {
        echo $1":"$2 >> phone.txt;
}
function delphone() {
        cut --character=$1 phone.txt  >> del_phone.txt | echo "Ok, $1 has been removed from the list.";
}
function err() {
        echo Please make sure to give me something to do!;
}

case $1 in
        "-a"|"--add")
                add $2 $3;;
        "-dp"|"--delete-phone")
                delphone $2;;
        "")
                err;;
esac;