HP3000-L Archives

August 2015, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Craig Lalley <[log in to unmask]>
Reply To:
Craig Lalley <[log in to unmask]>
Date:
Fri, 14 Aug 2015 15:40:02 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (67 lines)
Someone gave me an excellent course in variable and expressions.
Thanks to everyone for helping.
-Craig

      From: Francois Desrochers <[log in to unmask]>
 To: [log in to unmask] 
 Sent: Friday, August 14, 2015 5:32 AM
 Subject: Re: special characters in strings...
   
Craig,

I forgot to mention that the greater-than is in the variable in both cases. To see the content of a variable, I would use SHOWVAR instead of dereferencing the variable in another command. A dereferenced variable will be executed as you can see in the ECHO command. Escaping special characters is useful in some cases. It really depends what you want to do with the variable later on.

Thanks...François

-----Original Message-----
From: Francois Desrochers 
Sent: August-14-15 8:11 AM
To: 'Craig Lalley' <[log in to unmask]>; [log in to unmask]
Subject: RE: [HP3000-L] special characters in strings...

Craig,

I think you need to "escape" the greater-than with an exclamation point as in:

FDE:SETVAR SPOOL_NBR "O1234"
FDE:SETVAR COPY_FROM,"awk '{$1 ='""; print }' " + RTRIM("!SPOOL_NBR") + ".OUT.HPSPOOL " +  ">"  + " " +  RTRIM("!SPOOL_NBR")
FDE:ECHO !COPY_FROM
<Displays nothing. A temporary file called O1234 is created>
FDE: !COPY_FROM
<Displays nothing. A temporary file called O1234 is created>

FDE:SETVAR COPY_FROM,"awk '{$1 ='""; print }' " + RTRIM("!SPOOL_NBR") + ".OUT.HPSPOOL " +  "!>"  + " " +  RTRIM("!SPOOL_NBR")
FDE:ECHO !COPY_FROM
awk '{$1 ='"; print }' O1234.OUT.HPSPOOL > O1234 FDE:!COPY_FROM awk '{$1 ='"; print }' O1234.OUT.HPSPOOL > O1234 Unknown command name. (CIERR 975)

HTH

Thanks...François

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf Of Craig Lalley
Sent: August-13-15 11:52 PM
To: [log in to unmask]
Subject: [HP3000-L] special characters in strings...

SETVAR COPY_FROM,"awk '{$1 ='""; print }' " + RTRIM("!SPOOL_NBR") &
                      + ".OUT.HPSPOOL " +  ">"   + " " +  RTRIM("!SPOOL_NBR") ECHO !COPY_FROM 

It all fails with the >
How do I pass the > as a string and not an operator?

Thanks!
-Craig

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *



* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
  

ATOM RSS1 RSS2