- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ksh replace single qoutes in var.
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
Discussions
Discussions
Forums
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
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
тАО12-06-2010 04:47 PM
тАО12-06-2010 04:47 PM
I kind of stuck on easy thing how to apply command I can use from prompt inside my ksh script.
I need to replace single qoute in my var,
this work ok from prompt:
$ echo $mm|tr -d "'"
.
but how put this into new var or change existing $mm value inside the script? I know how to do it with file, but d'like to stay with var.
e.g.
$ mmm=`echo $mm|tr -d "'"` # this gaves me an error.
Appreciate you help on this easy for you subject. I check my manuals it's all clear untill hands on sample.
Best
Tr
Solved! Go to Solution.
- Tags:
- ksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-06-2010 05:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2010 12:53 AM
тАО12-07-2010 12:53 AM
Re: ksh replace single qoutes in var.
What does $mm have in it? What error do you have?
I have no problems with:
mm2=$(echo $mm | tr -d "'")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2010 02:44 PM
тАО12-07-2010 02:44 PM
Re: ksh replace single qoutes in var.
"This is a test"
nn=$(echo $mm | tr -d '"')
echo $nn
This is a test
Is this what you are looking for ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2010 04:19 AM
тАО12-08-2010 04:19 AM
Re: ksh replace single qoutes in var.
So, it appears that the suggestions offered solved your problem, based on point assignment. In that case, *exactly* what eliminated the error that you were encountering, and what *exactly* was that error?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2010 05:38 AM
тАО12-08-2010 05:38 AM
Re: ksh replace single qoutes in var.
You weren't still hoping for a clear
statement of the problem, were you? This
_is_ the HP-UX forum, isn't it?