June 8th, 2006, 04:02 AM
Join Date: Jun 2006
Time spent in forums: 40 m 24 sec
Reputation Power: 0
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.