- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- awk command
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
тАО03-06-2007 05:07 PM
тАО03-06-2007 05:07 PM
When i issue the command shown below it works fine in HP-UX.
cat /etc/passwd |awk -F ":" '{print $1"|"$3"|"$4"|"$5"|"$6"|"$7}' >a.txt
But when i try the same command in Solaris it gives the following error...
awk: syntax error near line 1
awk: bailing out near line 1
Please resolve this issue.
Thanks & Regard
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2007 05:38 PM
тАО03-06-2007 05:38 PM
Re: awk command
If you expect "awk" to work the same on
different systems, you would be wise to use
the same "awk" program on those systems. I
hear that GNU "awk" ("gawk") is fairly
portable.
http://www.gnu.org/software/gawk/gawk.html
If you want advice on "awk" on Solaris, you
might also try a Solaris forum.
http://www.sun.com/bigadmin/home/index.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2007 05:52 PM
тАО03-06-2007 05:52 PM
Re: awk command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2007 06:06 PM
тАО03-06-2007 06:06 PM
Re: awk command
It is still not working with spaces.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2007 07:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2007 07:16 PM
тАО03-06-2007 07:16 PM
Re: awk command
Thankyou Roberts. It worked.
Thank you all.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2007 07:20 PM
тАО03-06-2007 07:20 PM
Re: awk command
It worked when used with nawk.
Regards