- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: dtksh gui newline character not working
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
тАО08-31-2011 06:52 PM
тАО08-31-2011 06:52 PM
Hello,
I'm making a little dtksh script to make a couple of task easier and i'm running into a problem adding newline \n into strings.
I'm using
XmCreateMessageDialog BLAH $TOPLEVEL BLAHs \
dialogTitle:"Some title" \
helpLabelString:"Help" \
cancelLabelString:"Cancel" \
messageString:"I'm a string \n Neat Ha"
This doesn't appear to be working, if i put a newline on the end it won't work either as in outside the ".
How does everybody else make newlines?
Any help would be great.
Cheers.
Solved! Go to Solution.
- Tags:
- dtksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2011 07:19 PM
тАО08-31-2011 07:19 PM
Solutioni ended up create a string and then using echo to get it in there e.g.
msg1=`echo "I'm \n a test \n message"`
then
messageString="msg1"
this worked, i've been looking for something like this for days now...hope someone uses it one day.
you can probably bypass using a sep string and just plug it straight into the messageString resource value but haven't tried.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2011 05:20 PM - edited тАО09-01-2011 06:27 PM
тАО09-01-2011 05:20 PM - edited тАО09-01-2011 06:27 PM
Re: dtksh gui newline character not working
\n is not the newline character, it is an escape sequence that echo (as a shell built in or external command), awk, printf (and others) understand and will convert the special code to an actual newline character. Note that the term escape sequence has a larger meaning that includes anything that triggers an alternate interpretation of the next set of characters. It might be the "\" character, the ESC character or even ASCII SO and SI characters. It's up to the underlying translation routines to interpret such codes (or not).
Bill Hassell, sysadmin