Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Wher is an error ?
Try putting a space between $userid and the = and the xxx in your if [ ]
test.
The shell is picky about where put the spaces.
Try this stuff below (note I added the spaces in [ $userid = xxx ];)
>
>userid=xxy
>export userid
>echo $userid
xxy
>if [ $userid = xxx ]; then echo 'aaa'; else echo 'bbb'; fi
bbb
>
-----Original Message-----
Sent: Wednesday, June 27, 2001 7:46 PM
To: Multiple recipients of list ORACLE-L
Did you export userid?
Hewlett-Packard Company 3000 Hanover Street Palo Alto, CA 94304 U.S.A.
Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
>
>userid=xxy
>export userid
>echo $userid
xxy
>if [ $userid=xxx ]; then echo 'aaa'; else echo 'bbb'; fi
aaa
>
--Chris
Chris.Bowes_at_Kosa.com
-----Original Message-----
<mailto:Alex.Hillman_at_usmint.treas.gov> ]
Sent: Wednesday, June 27, 2001 6:50 PM
To: Multiple recipients of list ORACLE-L
17:17:14:oracle8i_at_coin-app:/u07/export8i:ORUNDEF
513-> userid=xxy
17:17:26:oracle8i_at_coin-app:/u07/export8i:ORUNDEF
514-> if [ $userid=xxx ]; then echo 'aaa'; else echo 'bbb'; fi
aaa
17:17:51:oracle8i_at_coin-app:/u07/export8i:ORUNDEF
515->
why does it print aaa instead of bbb?
Alex Hillman
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com <http://www.orafaq.com> -- Author: Hillman, Alex INET: Alex.Hillman_at_usmint.treas.gov Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). * * * * * Freedom of Information Act Notice * * * * * The information in this email is subject to the record protection mandated by 5 United States Code 552(b)(4) and relevant judicial opinions. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Sherman, Edward INET: shermanej_at_eccic.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jun 27 2001 - 18:28:28 CDT