- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: awk printing ' character
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-06-2003 04:43 AM
тАО08-06-2003 04:43 AM
Re: awk printing ' character
If flip doesn't work then I'll give it another go.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2003 05:20 AM
тАО08-06-2003 05:20 AM
Re: awk printing ' character
#!/bin/sh
QUOT="'"
echo " " | awk -v quot=$QUOT '
{ print quot,quot,"abcd",quot,quot;}'
just an example.
Rgds,
Jean-luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2003 06:46 AM
тАО08-06-2003 06:46 AM
Re: awk printing ' character
I adopted the "'\''" approach after I'd cut and paste it into notepad to see what was actually going on, seemed to fit well with what I was doing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2003 07:00 AM
тАО08-06-2003 07:00 AM
Re: awk printing ' character
For clarity later, the post of mine you used:
# ls -l /tmp/me|awk '{print "'\''" $NF "'\''"}'
is garbled badly when it is displayed here. For reference, the character sequence is:
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2011 11:09 AM
тАО06-05-2011 11:09 AM
Re: awk printing ' character
ls | awk '{print $1}'
For clearer explanation go through the AWK PROGRAMMING MODEL
which explains how the awk works
http://linux-forum-karthik.blogspot.com/2011/05/awk-programming-model.html
and go through the awk variables usuage
http://linux-forum-karthik.blogspot.com/2011/05/awk-variables.html
Above links will be useful in learning the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2011 11:57 AM
тАО06-05-2011 11:57 AM
Re: awk printing ' character
ls | evil_quoting_script.awk
In the script:
#!/usr/bin/awk -f
{print "'" $1 "'"}
Or you can do it the direct (right) way with escapes:
ls | awk '{print "\x27" $1 "\x27"}'
>karthik3152: do it this way
The OP has said several times that's not what he wants.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 07:56 AM
тАО06-09-2011 07:56 AM
Re: awk printing ' character
I suppose I'd better close the thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 07:58 AM
тАО06-09-2011 07:58 AM
Re: awk printing ' character
- « Previous
-
- 1
- 2
- Next »