Solved

sed solaris issue?

Posted on 2011-03-08
2
534 Views
Last Modified: 2012-05-11
I have been used the solution given, it works fine with linux, but not on SOLARIS
can you help with this updated:
sed 's/$DB_NAME:\/export\/oracle\/product\/11.2.0.1:N/$DB_NAME:\/export\/oracle\/product\/11.2.0.2:N/g' /etc/oratab

the answer i was given and looks ok for linux is
sed -i 's/DATABASE:\/export\/oracle\/product\/11.2.0.1:N/DATABASE:\/export\/oracle\/product\/11.2.0.2:N/' /export/oracle/oratab
0
Comment
Question by:radical_mit
2 Comments
 
LVL 23

Accepted Solution

by:
Maciej S earned 500 total points
ID: 35070926
sed 's/.../.../' /export/oracle/oratab > /tmp/oratab.tmp && mv /tmp/oratab.tmp /export/oracle/oratab

sed on solaris doesn't support -i option. You have to use above syntax, or install GNU sed.

You can also make this sed a little bit prettier by using separator other than "/". For example "+":
sed 's+DATABASE:/export/oracle/product/11.2.0.1:N+DATABASE:/export/oracle/product/11.2.0.2:N+' /export/oracle/oratab > /tmp/oratab.tmp \
   && mv /tmp/oratab.tmp /export/oracle/oratab
0
 

Author Closing Comment

by:radical_mit
ID: 35080017
Thanks, that worked 100%
t
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now