- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to replace a text like ${ORACLE_HOME} in a...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 08:28 AM
07-12-2018 08:28 AM
How to replace a text like ${ORACLE_HOME} in a string by the real value of the variable itself ?
Hi,
How to replace a text like ${ORACLE_HOME} by the real value of the variable itself ?
Here is an example:
PRM_PARMS=BLKSIZE='1048576,SBT_LIBRARY=${ORACLE_HOME}/lib/libddobk.so,ENV=(STORAGE_UNIT=oramount,BACKUP_HOST=server1,ORACLE_HOME=${ORACLE_HOME})'
ORACLE_HOME=/u01/test
I tried something like this:
echo $PRM_PARMS | sed 's/'/${ORACLE_HOME}'/${ORACLE_HOME}/g'
But without success.
Do you have any idea of the sed command I should write ?
Thanks a lot in advance,
Kind regards,
Den.
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 08:54 AM
07-12-2018 08:54 AM
Re: How to replace a text like ${ORACLE_HOME} in a string by the real value of the variable itself ?
Not sure what you need, but simply tracing the script will show the value for each variable.
Insert the command: set -x into the script
or run the script with -x as in: ksh -x myscript
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 08:58 AM
07-12-2018 08:58 AM
Re: How to replace a text like ${ORACLE_HOME} in a string by the real value of the variable itself ?
I finally found a solution .../
PRM_PARMS=$(echo $PRM_PARMS | sed "s|\${ORACLE_HOME}|${ORACLE_HOME}|g")
thanks.