Home » Infrastructure » Unix » Unix question (Linux)
Unix question [message #330277] Sat, 28 June 2008 15:00 Go to next message
msuphaluk
Messages: 20
Registered: December 2007
Location: BKK,Thailand
Junior Member
Dear All,
I am facing an unix programming question.

OU="AA BR CO"
RESPAA="AA Purchasing"
RESPBR="BR Purchasing"
RESPCO="COR Purchasing"

for rec in $OU
do
X="RESP"$rec
echo $X
done

I expect to get the result like the "AA Purchasing" but it returns "RESPAA". So how can I fix this code?

Thank you in advanced,

Suphaluk M.
Re: Unix question [message #330285 is a reply to message #330277] Sat, 28 June 2008 15:23 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & FOLLOW the Posting Guideline as stated in URL above

This question has NOTHING to do with Oracle & is not appropriate for this forum.

>So how can I fix this code?
By using the environmental variable & not a constant.
Re: Unix question [message #330286 is a reply to message #330277] Sat, 28 June 2008 15:37 Go to previous messageGo to next message
msuphaluk
Messages: 20
Registered: December 2007
Location: BKK,Thailand
Junior Member
Thank you for your promptly reply. I will do it carefully when I post the question next time.

Regards,
Suphaluk M.

PS. even I use variable but the result is still not correct.
Re: Unix question [message #330287 is a reply to message #330277] Sat, 28 June 2008 15:39 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
This topic is locked.
Previous Topic: Solaris
Next Topic: Positional Parameters Resetting
Goto Forum:
  


Current Time: Thu Mar 28 18:28:57 CDT 2024