> -----Original Message-----
> From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, July 15, 2004 11:59 AM
> To: [EMAIL PROTECTED]
> Subject: Bash script question
> 
> 
> I have cut some lines of code out of a bash script I am 
> trying to execute.
> 
> <snip>
> 
> T2="NONE"
> T1=$_PAGESIZE
> if [ "$T2" = "$T1" ]; then
> 
> <snip>
> 
> I ran this using the -x option at the start of the script for 
> debugging and
> it produced the following results.
> 
> + T2=NONE
> + T1=NONE
> + '[' NONE = $'NONE\r' ']'
> 
> Will someone please help me understand why the "\r" was 
> appended to the if
> clause?  And how can I change this code to make this a valid 
> compare.  If
> needed, I will be happy to provide more information.
> 
> TIA
> 
> Doug
> 

I think that the "back tick" ` got translated to an underscore in your
message. If that is true, then the reason for the "\r" is that the
program PAGESIZE outputs a "\r" as is normal.

If you are assigning the value of _PAGESIZE environment variable to T2,
then "never mind" because I don't know why it would have the "\r".
Unless, of course, _PAGESIZE has the "\r" in it due it being set by a
back-tick'ed program itself. Or set to another envvar which has a "\r"
due to being set by ....


--
John McKown
Senior Systems Programmer
UICI Insurance Center
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its'
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to