- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: awk escape sequence
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
тАО10-31-2003 02:08 AM
тАО10-31-2003 02:08 AM
Under HP-UX awk version, the escape sequence \c permits to continue writing to the same line with the next print command ( no carriage return, new line is set)
Under linux, the escape sequence \c doesn't exist so it replace it by a "c" character
awk: cmd. line:5: warning: escape sequence `\c' treated as plain `c'
Does an equivalent escape sequence or other stuff would work?
Thanks in advance
Denis
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2003 02:24 AM
тАО10-31-2003 02:24 AM
Re: awk escape sequence
I just know there is a compatibility switch in gawk
awk --compat 'your srcipt'
Probably there are other way's
will have a look
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2003 02:31 AM
тАО10-31-2003 02:31 AM
Re: awk escape sequence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2003 03:04 AM
тАО10-31-2003 03:04 AM
Re: awk escape sequence
Seem's to do it
extarcted from man page
a line can be continued by ending it with a ├в \├в , in
which case the newline will be ignored.
end of extract from man page.
Does that work ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2003 03:29 AM
тАО10-31-2003 03:29 AM
Re: awk escape sequence
just did a cut and past from linux man gawk to reply, and should have preview before submit
In my doc here there is also the
-W posix
switch have you tried that ?
If none of the above works for you could attach a small example script that work under HP-UX and does not work under linux... so we can try or hand at this ?
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2003 01:01 AM
тАО11-02-2003 01:01 AM
Solution'printf' does not automatically add a newline to the end of the line and you can format it anyway you want:
mandy-DEB ## echo -e '\n'| awk '{printf NR " hohoho "}'
1 hohoho 2 hohoho
mandy-DEB ## echo -e '\n'| awk '{printf NR " hohoho\n"}'
1 hohoho
2 hohoho
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2003 06:15 PM
тАО11-02-2003 06:15 PM
Re: awk escape sequence
> "-W posix" doesn't seems to change anything as the error message is still the same
Bob > That will do the trick, thank you for this workaround
Thank you all for your help
Regards
Denis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2003 10:33 PM
тАО11-02-2003 10:33 PM
Re: awk escape sequence
Thanks for the points.
(Zero points for this answer of course)
J-P