how to input the CAT command output in Shell

Hi guys...

I am new to this scripting...so please forgive me if anything worng in my questions...

here is my question..

I have file structure

/home/oracle/<sid>/logs/bkup

now i want to write a script which should grep the sid name from a file..and it should replace the <SID> with tht name and it has to check the last logfile which is created for errors.

now the problem is i have command to get the list of SID

cat /etc/oratab | awk '{print $1}' | cut -f1 -d ":"

sid1
sid2
sid3
sid4
...
...
...

problem is how do i replace the this SID's in tht location like

/home/oracle/sid1/log/bkup
....etc..

No duplicate or cross-posting, please read the rules.

Continue here:http://www.unix.com/shell-programming-scripting/107346-scripting-help.html\#post302307655

Thread closed.