From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: steve.simon@snellwilcox.com Message-Id: <3276469819@snellwilcox.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MIME MULTIPART BOUNDARY=.1041603845:+'1" Content-Id: <3276469819-1@snellwilcox.com> Subject: [9fans] rc funny / my lack of understanding Date: Fri, 3 Jan 2003 14:23:05 +0000 Topicbox-Message-UUID: 3b65b5b2-eacb-11e9-9e20-41e7f4b1d025 --MIME MULTIPART BOUNDARY=.1041603845:+'1 Content-Type: text/plain; charset=US-ASCII Content-Id: <3276469819-2@snellwilcox.com> Content-Transfer-Encoding: 7bit Hi, Attached is a bit of hget + rc + sam -d to get recent AP newswire stories. It has two modes - without an arg it lists the stories, with one it prints that story. The if statement seems to confuse the here document syntax of rc and it start interpreting the tmp file as commands - all very odd. If I remove the if statement and implement the program as two scripts envoked seperately it works so the basic code must be right... I think. I tried running the sam -d here document in a subshell ( @{...} ) but it still did the same thing. Confused of Winchester, -Steve --MIME MULTIPART BOUNDARY=.1041603845:+'1 Content-Type: application/octet-stream Content-Id: <3276469819-3@snellwilcox.com> Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Newswire" IyEvYmluL3JjCiMKIwlnZXQgQVAgbmV3cyBoZWFkbGluZSBsaXN0IG9yIHRoZSBnaXZlbiBzdG9y eQojCgp0bXA9L3RtcC90bXAuJHBpZAp3aXJlPSdodHRwOi8vd3d3Lm5ld3NkYXkuY29tL25ld3Mv bmF0aW9ud29ybGQvd2lyZScKCmlmICggfiAkIyogMCApewoJaGdldCAkd2lyZSB8IGdyZXAgaGVh ZGxpbmVzID4gJHRtcAoJc2FtIC1kICR0bXAgPlsyXSAvZGV2L251bGwgPDwgJ0VPRicKCQkseC9e LipzbnMtL2QKCQkseC8sMCxbMC05XSpcLnN0b3J5LioiPi9jL0AvCgkJLHgvPFwvYT4vZAoJCXcK CUVPRgoJYXdrIC1GQCAne3ByaW50ZigiJS00NXMgJXNcbiIsICQxLCAkMik7fScgJHRtcAoJcm0g LWYgJHRtcAoJZXhpdCAwCn0KCmhnZXQgJHdpcmUvXnNucy1eJDFeLnN0b3J5ID4gJHRtcApzYW0g LWQgJHRtcCA+WzJdIC9kZXYvbnVsbCA8PCAnRU9GJwoJMCwvRU5EIFJFTEFURUQgQ09OVEVOVCBS QUlMLyBkCgkvXjxcL2ZvbnQ+JC8sJCBkCgkseC8mY29weTsvIGMvKGMpLwoJLHgvJm5ic3A7LyBj LyAvCgkseC8mbHQ7LyBjLzwvCgkseC8mZ3Q7LyBjLz4vCgkseC8mYW1wOy8gYy8mLwoJLHgvJm5i c3A7LyBjLyAvCgkseC8mW2EtejAtOV1bYS16MC05XSo7LyBkCgkseC88YnI+LyBjL1xuLwoJLHgv PFtePl0qPi8gZAoJL14gKiQvIGQKCXcKRU9GCmZtdCAkdG1wCnJtIC1mICR0bXAK --MIME MULTIPART BOUNDARY=.1041603845:+'1--