2 Linux shell script (Bash) problems

Hi,

I'm only a shell script beginner but unfortunately I have to write some cron job in Bash shell. I get 2 problems right now.

1.) I need to read a config file like this

sample.conf
======================
key1=value1
key2=value2

how can I create variable so that
$key1 = value1 and $key2 = value2 ??

now I have

cat sample.conf | while read NAME VAL
do
export NAME=VAL
done

but "export" doesn't work (this script works in ksh).

2.) "Date" function gives me today, but how can I get yesterday? And in general is there any function that allows me to manipulate date?

Thanks for your help in advance.

Michael
[735 byte] By [michael_hk] at [2007-11-19 22:30:51]