[urgent] Need help with Unix

raksrules

Well-Known Member
Elite
Aug 30, 2007
9,859
1,728
378
Mumbai <--> Pune
Hi Guys,
i am facing issue with Unix commands

I created a small shell script to reproduce this issue.

Code:
echo FCP_USERNAME="RAKS.RULES"  | sed 's/FCP_USERNAME=//g' > tmp
cat tmp | read abc
echo value is $abc
Now we are working on Oracle upgrade project and the Unix Box used for the older version was a HP UX and the new Unix Box is based on Linux. I am not aware about these OS technicalities.

So when the above shell script is encapsulated in a file named test.sh and i run the command as

Code:
sh test.sh
The result on the HP UX based Unix is

Code:
value is RAKS.RULES
while on the new Unix box it is

Code:
value is
The value is not displayed at all. the READ command does not work in this new Unix Box. On further search i gave the command

Code:
man read
and it did not throw any results which i think means that READ command is not available in this version. right ?

In that case what is the workaround to reach the value to a variable/file echoed by the ECHO command ??