- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to pass a character string with parenthesis em...
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
тАО04-05-2004 02:22 AM
тАО04-05-2004 02:22 AM
I have some database messages generated with parenthesis and would like to pass into a ksh shell script. Would like to hear suggestion on how to get around this parenthesis problem? Thanks.
Kelvin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 02:28 AM
тАО04-05-2004 02:28 AM
Re: How to pass a character string with parenthesis embedded in ksh shell?
what about quotes:
A='(dutch monkey)' (or "(dutch monkey)"
B="$A"
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 02:30 AM
тАО04-05-2004 02:30 AM
Re: How to pass a character string with parenthesis embedded in ksh shell?
omega# cat > /tmp/test.ksh
#!/usr/bin/ksh
echo "$1"
omega# chmod 750 /tmp/test.ksh
omega# /tmp/test.ksh "(this is a test)"
(this is a test)
omega#
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 02:33 AM
тАО04-05-2004 02:33 AM
Re: How to pass a character string with parenthesis embedded in ksh shell?
xx="(message 1)"
yy="{message 2}"
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 02:47 AM
тАО04-05-2004 02:47 AM
Re: How to pass a character string with parenthesis embedded in ksh shell?
#test_ksh1 "abc(efg)"
MESSAGE="$*"
remsh HOSTA -n /pagermail.ksh $MESSAGE
The MESSAGE got the string without problem, but when the same message tried to pass to the paging script with parameter $MESSAGE, the parenthesis caused problem.
Hope that this can explain better about my problem. Thanks.
Kelvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 02:50 AM
тАО04-05-2004 02:50 AM
Re: How to pass a character string with parenthesis embedded in ksh shell?
remsh HOSTA -n /pagermail.ksh "$MESSAGE"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 02:53 AM
тАО04-05-2004 02:53 AM
Re: How to pass a character string with parenthesis embedded in ksh shell?
remsh HOSTA -n /pagermail.ksh "${MESSAGE}"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 03:43 AM
тАО04-05-2004 03:43 AM
Re: How to pass a character string with parenthesis embedded in ksh shell?
I did that
remsh HOSTA -n /pagermail.ksh "${MESSAGE}"
However, I still failed to pass the string and the error is still on ksh shell i.e.
ksh: syntax error at line 1 : `(' unexpected
If run it locally i.e. without remsh, the script works fine. It looks like remsh complains about the way it calls the script remotely.
Any suggestion what might go wrong in my script. Thanks.
Kelvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 04:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2004 04:40 AM
тАО04-05-2004 04:40 AM
Re: How to pass a character string with parenthesis embedded in ksh shell?
remsh HOSTA -n '/pagermail.ksh \"${MESSAGE}\"'