Hi,
I have an extremely limited knowledge of shell scripts. Here is what I want to do. I would like to set up a shell script to delete, "RM" command, db2 backups from the backup directory. So far, I've come up with a db2 select statement to get today's date - 2 months in a variable with a yyyymm format. Here's what I want to do:
pdate variable is equal to 200403 (built from sql script)
what I want to come up with is a command that looks like:
rm COMMCMSD.0.cmsdev.NODE000.CATN0000.200403*.*
I don't care if it's pretty, I could hardcode the command in the shell as:
rm COMMCMSD.0.cmsdev.NODE000.CATN0000.pdate*.*
or
put the entire directory in a variable called $pdatecmd
rm $pdatecmd
However, I don't know enough to know how to concatinate literals/variables.
In OS390, I can build the entire statement in SQL, I can't get this to work in the aix shell command because i'm not sure how to delimeter strings within the sql statement. Any help would be appreciated. Thanks!!