|
Antwort: RE: DM Numeric custom script monitor: msg#00634sysutils.tivoli.general
Hi Chuck, there is a difference between `cat file` and RESULT=`cat file`. In the latter case, the contents of "file" will be assigned to RESULT. In the first case, the shell will interpret each line of "file" as a command and execute it. If someone puts a line like Thomas example into your file, this would most likely not be what you intended to happen :-) For your purpose of printing file to standard out, leave out the backticks. Hth, Lothar "Chuck Floray" <cfloray-PkbjNfxxIARBDgjK7y7TUQ@xxxxxxxxxxxxxxxx> Gesendet von: owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx 29.04.2004 22:47 Bitte antworten an tme10 An: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx Kopie: Thema: RE: [tme10] DM Numeric custom script monitor I didn't see an echo `<text_string>` in my example. And I'm doing cat not rm. Your right, technically the line could simply be cat /blah/blah/blah in a shell script. But you could also do RESULTS=`cat /blah/balh/blah` Then do "something" with $RESULTS And on and on and on ..... Basically do it the way you want then simply make sure "you're doing what you want". I came into this world with nothing. And I have most of it left ! ----Original Message Follows---- From: t.seeling.extern_ohne_vollmacht-Dy1qpeo47VWzQB+pC5nmwQ@xxxxxxxxxxxxxxxx Reply-To: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx To: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx Subject: [tme10] DM Numeric custom script monitor Date: Thu, 29 Apr 2004 09:09:54 +0200 MIME-Version: 1.0 Received: from e33.co.us.ibm.com ([32.97.110.131]) by mc2-f6.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Thu, 29 Apr 2004 00:15:23 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11])by e33.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i3T7CU87499640;Thu, 29 Apr 2004 03:12:30 -0400 Received: from d03mjd01.boulder.ibm.com (t03av06.boulder.ibm.com [9.17.192.139])by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i3T7AjRh368294;Thu, 29 Apr 2004 01:12:25 -0600 Received: (from mjrdomo-bi+AKbBUZKZeoWH0uzbU5w@xxxxxxxxxxxxxxxx)by d03mjd01.boulder.ibm.com (8.12.10/8.12.10) id i3T7AhIx000671;Thu, 29 Apr 2004 01:10:43 -0600 X-Message-Info: EoYTbT2lH2OnQu4+TCBskjQFc2zhz7/y Sensitivity: Message-ID: <OFA19441B9.A7C7FF0D-ONC1256E85.00273009-Dy1qpeo47VWzQB+pC5nmwQ@xxxxxxxxxxxxxxxx> Precedence: bulk Return-Path: owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx X-OriginalArrivalTime: 29 Apr 2004 07:15:25.0002 (UTC) FILETIME=[BDD132A0:01C42DB9] Hallo, >#!/bin/sh >`cat /my_dir/my_dir/my_file` is the use of backticks really intended here? This is mostly dangerous! The contents of the file is executed as a shell command, and depending on the file permissions anyone might write to the file (imagine someone uses echo 'rm -fr /* > /my_dir/my_dir/my_file) Tschau...Thomas -- "Do you wanna be a legend or a passing footprint on the sands of time?" Senior Consultant, Tivoli Certified Enterprise Consultant + Instructor santix AG, www.santix.de, info-/JKUMw0Y9jazQB+pC5nmwQ@xxxxxxxxxxxxxxxx, fon +49-89-321506-0, fax -99 Weihenstephaner Str. 4, D-85716 Unterschleissheim, GSM +49-171-4416678 Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: SWD 4.2 FP03 windows registry key creation failure: 00634, Baturin Dmitry |
|---|---|
| Next by Date: | TEC database stopped getting events: 00634, Tarek Mohammed |
| Previous by Thread: | RE: RE: [tme10] [FW] MS04-011 causing Tivoli user rights to disappear?i: 00634, gunnar.svanberg-tQ0j8nVVjSY |
| Next by Thread: | TEC database stopped getting events: 00634, Tarek Mohammed |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |