Subject: | |
From: | |
Reply To: | |
Date: | Fri, 14 Aug 2015 12:32:31 +0000 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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 *
|
|
|