2 Linux shell script (Bash) problems
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
how can I create variable so that
$key1 = value1 and $key2 = value2 ??
now I have
cat sample.conf | while read NAME VAL
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.
export just sets the environment variable.
What I'd do is use sed to parse them off, but I'm no sed expert so you're on your own.