[Chicago-talk] printing a hash value that has shell code in it.

Don Drake don at drakeconsult.com
Fri Dec 5 14:55:35 CST 2003

Parse out `date +%(.*?)` and replace $1 with the output of


-----Original Message-----
From: chicago-talk-bounces at mail.pm.org
[mailto:chicago-talk-bounces at mail.pm.org]On Behalf Of Dooley, Michael
Sent: Friday, December 05, 2003 1:01 PM
To: Chicago.pm chatter
Subject: [Chicago-talk] printing a hash value that has shell code in it.

open (DFH_FILE, "/var/adm/scripts/dfh") or die "Can not read DFH file ($!)";
	foreach (<DFH_FILE>) {
		($dfhtype, $dfh) = split(/=/, $_);
close DFH_FILE;

foreach (values (%dfhhash)) {
print $_,"\n";
what if each line in DFH_FILE look like this. Anyone have any ideas how I
can convert the date portion to a legitamit date.

Q107945="DFH1  CW_OMS         4165909998     `date
+%Y%m%d%H%M%S%Y%m%d%H%M%S` q107945     01"
Q166204="DFH|1|q166|q190|`date +%Y%m%d`|`date +%H%M%S`|`date
ACCESSDBTXT="DFH,1,q100,CW_TMS,`date +%Y%m%d`,`date +%H%M%S`,`date
OMSARFIN="DFH   1       CW_OMS  CW_FIN  `date +%Y%m%d`  `date +%H%M%S`
`date +%Y%m%d%H%M%S`    AR_OUT  0       1"
Chicago-talk mailing list
Chicago-talk at mail.pm.org

More information about the Chicago-talk mailing list