help with unix commands

PAUL DIACONESCU paul_diaconescu at hotmail.com
Wed Jan 25 12:31:08 CST 2006


The 'COMMANDCODE' works perfectly.
It's exactly what I was looking for.
Coclusion of that: Read the Powerhouse manual before asking help at 
sowder.com.
But the second methode, send email to swoder.com lokks easer and faster.
Thank-you to all.
Paul Diaconescu


>From: "Goparaju, Vidyasagar" <VGoparaju at tradepointsystems.com>
>To: "PAUL DIACONESCU" <paul_diaconescu at hotmail.com>
>Subject: RE: help with unix commands
>Date: Wed, 25 Jan 2006 12:28:30 -0500
>
>I think you can use COMMANDCODE to check the status:
>
>Here is what I got when I ran the same and found a match:
>
>COMMANDOK = TRUE
>COMMANDCODE = <This item has no assigned value>
>COMMANDMESSAGE = <This item has no assigned value>
>
>No match but command is OK:
>COMMANDOK = FALSE
>COMMANDCODE = "UX-WRN #0001"
>COMMANDMESSAGE = "Command exited with status #1"
>
>When you have error on command like incorrect file name.
>COMMANDOK = FALSE
>COMMANDCODE = "UX-WRN #0002"
>COMMANDMESSAGE = "Command exited with status #2"
>
>Catch is you need to add ON ERROR CONTINUE NOWARN.
>
>Sagar
>
>-----Original Message-----
>From: powerh-l-bounces+vgoparaju=tradepointsystems.com at lists.sowder.com 
>[mailto:powerh-l-bounces+vgoparaju=tradepointsystems.com at lists.sowder.com]On 
>Behalf Of PAUL DIACONESCU
>Sent: Wednesday, January 25, 2006 9:54 AM
>To: powerh-l at lists.sowder.com
>Subject: RE: help with unix commands
>
>Thank you for your help.
>Your solution works for this particular command (grep),
>but my question was more general.
>How can I retrieve the exit status of a unix command executed in a quick
>screen via 'run command'.
>In unix this status is in the variable '$?'.
>How can I retrieve this exit status in the Quick screen ?
>paul diaconescu
>
>
> >From: "Ken Langendock" <Ken at Langendock.com>
> >Reply-To: <Ken at Langendock.com>
> >To: "'PAUL DIACONESCU'" <paul_diaconescu at hotmail.com>
> >Subject: RE: help with unix commands
> >Date: Wed, 25 Jan 2006 10:34:53 -0500
> >
> >I'm sorry if this answer is incorrect, I don't have the UNIX machine
> >located where I am currently, but I believe if you GREP the file you are
> >looking for and redirect the out put to another file.
> >
> >It will either a) only create the file if there is a positive result OR
> >b) the file will be empty.
> >
> >Then you can test the existence and/or size of the file for your answer.
> >
> >Hope this helps
> >Ken
> >
> >PS I may have an example, I will look for one.
> >
> >-----Original Message-----
> >From: powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com
> >[mailto:powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com] On
> >Behalf Of PAUL DIACONESCU
> >Sent: January 25, 2006 10:24 AM
> >To: powerh-l at lists.sowder.com
> >Subject: RE: help with unix commands
> >
> >
> >Thank-you for your answer.
> >I do not want to check for the existence of a file.
> >I want to check for the existence of one or more lines containing 'abc'
> >on a
> >particular file
> >The 'grep' command exits with status = 0 if any lines match, 1 if not
> >and 2
> >for erreors.
> >How can I retrieve the exit-status ($?) in the quick program ?
> >paul diaconescu
> >
> >
> > >From: "Ole Hansen, ScanConsult" <oh at scanconsult.dk>
> > >Reply-To: oh at scanconsult.dk
> > >To: "'PAUL DIACONESCU'" <paul_diaconescu at hotmail.com>,
> > ><powerh-l at lists.sowder.com>
> > >Subject: RE: help with unix commands
> > >Date: Wed, 25 Jan 2006 16:11:46 +0100
> > >
> > >Paul,
> > >
> > >I can't answer your question, but I have a feeling that you wish to
> >test
> > >for
> > >existence of af particular file. If my feeling is correct, here is what
> >we
> > >do:
> > >
> > >let cmd_str = "ls $HOME/filename" ; change to point to correct file
> > >run command cmd_str nowarn on error continue
> > >if commandok
> > >  then let fileexists = "1"
> > >  else let fileexists = "0"
> > >
> > >... otherwise - sorry for the wasted bandwidth.
> > >
> > >Mange hilsner / With kind regards
> > >
> > >Ole Hansen
> > >
> > >===========================================================
> > >E-mail: oh at scanconsult.dk         Cell Phone: +45 4040 1150
> > >===========================================================
> > >ScanConsult IT-Partners ApS         Voice   : +45 7734 7474
> > >Jegstrupvej 96A                     Fax     : +45 8738 1416
> > >DK-8361 Hasselager         Support : support at scanconsult.dk
> > >Denmark                    Sales   :   sales at scanconsult.dk
> > >                  http://www.scanconsult.dk
> > >= ParaSuite :  A Suite of Air Cargo Handling solutions    =
> > >= Partners  : Hewlett-Packard, Cognos, Microsoft and more =
> > >
> > >
> > >-----Original Message-----
> > >From: powerh-l-bounces+oh=scanconsult.dk at lists.sowder.com
> > >[mailto:powerh-l-bounces+oh=scanconsult.dk at lists.sowder.com] On Behalf
> >Of
> > >PAUL DIACONESCU
> > >Sent: 25. januar 2006 15:52
> > >To: powerh-l at lists.sowder.com
> > >Subject: help with unix commands
> > >
> > >quick, on hp unix.
> > >
> > >I try to do a <RUN COMMAND "grep 'abc' filexx > /dev/null>
> > >
> > >In unix this command exits with a status ($?)  = 0, 1 or 2.
> > >
> > >How can I retrieve this status ($?) in my quick screen ?
> > >
> > >paul diaconescu
> > >
> > >
> > >--
> > >= = = = = = = = = = = = = = = = = = = = = = = = = = = = Mailing list:
> > >powerh-l at lists.sowder.com
> > >Subscribe: "subscribe" in message body to
> >powerh-l-request at lists.sowder.com
> > >Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
> > >powerh-l-request at lists.sowder.com
> > >http://lists.sowder.com/mailman/listinfo/powerh-l
> > >This list is closed, thus to post to the list you must be a subscriber.
> > >
> > >--
> > >= = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > >Mailing list: powerh-l at lists.sowder.com
> > >Subscribe: "subscribe" in message body to
> >powerh-l-request at lists.sowder.com
> > >Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
> > >powerh-l-request at lists.sowder.com
> > >http://lists.sowder.com/mailman/listinfo/powerh-l
> > >This list is closed, thus to post to the list you must be a subscriber.
> >
> >
> >--
> >= = = = = = = = = = = = = = = = = = = = = = = = = = = =
> >Mailing list: powerh-l at lists.sowder.com
> >Subscribe: "subscribe" in message body to
> >powerh-l-request at lists.sowder.com
> >Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
> >powerh-l-request at lists.sowder.com
> >http://lists.sowder.com/mailman/listinfo/powerh-l
> >This list is closed, thus to post to the list you must be a subscriber.
> >
>
>
>--
>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>Mailing list: powerh-l at lists.sowder.com
>Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
>Unsubscribe: "unsubscribe &lt;password&gt;" in message body to 
>powerh-l-request at lists.sowder.com
>http://lists.sowder.com/mailman/listinfo/powerh-l
>This list is closed, thus to post to the list you must be a subscriber.
>
>STATEMENT OF CONFIDENTIALITY:
>The information contained in this electronic message is intended for the 
>exclusive use of the addressee(s) and may contain confidential information. 
>  If you are not the intended recipient of this email, be advised you have 
>received this message in error and that any use, dissemination, forwarding, 
>printing, or copying is strictly prohibited.  Please notify TradePoint 
>Systems LLC immediately at (603) 889-3200 and destroy all copies of this 
>message and any attachments.
>




More information about the powerh-l mailing list