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

Dooley, Michael Dooley.Michael at con-way.com
Fri Dec 5 13:00:34 CST 2003


open (DFH_FILE, "/var/adm/scripts/dfh") or die "Can not read DFH file ($!)";
	foreach (<DFH_FILE>) {
		chomp;
		($dfhtype, $dfh) = split(/=/, $_);
		$dfhtype=lc("$dfhtype");
		$dfhhash{$dfhtype}=$dfh;
	}
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
+%Y%m%d%H%M%S`|q166204i|0|1"
ACCESSDBTXT="DFH,1,q100,CW_TMS,`date +%Y%m%d`,`date +%H%M%S`,`date
+%Y%m%d%H%M%S`,q100204i,0,1"
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"
--------------



More information about the Chicago-talk mailing list