Awk Syntax Error Near Line 2
Contents |
Members Today's Posts Answers to Frequently Asked Questions FAQ for UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, awk syntax error near line 1 awk bailing out near line 1 Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. Search Forums Show line 2 syntax error near unexpected token newline Threads Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page...
/etc/sudoers Syntax Error Near Line 1
linux operating commands and unix operating commands awk: bailing out Answers to Frequently Asked Questions Tags awk bailing out posix Thread Tools Search
Awk Bailing Out Near Line 1 Solaris
this Thread Display Modes #1 04-17-2012 Scrutinizer Moderator Join Date: Nov 2008 Last Activity: 1 October 2016, 5:20 PM EDT Location: Amsterdam Posts: 11,017 Thanks: 431 Thanked 3,063 Times in 2,716 Posts awk: bailing out If you see this: Code: awk: syntax error near line 1 awk: bailing out near line 1 Chances are you awk syntax error near line 1 awk bailing out near line 1 solaris are working on Solaris and you are using standard awk. If so, you need to use /usr/xpg4/bin/awk instead, which is POSIX awk (or nawk if that is not available). The Following 2 Users Say Thank You to Scrutinizer For This Useful Post: CarloM(08-31-2012), methyl(04-17-2012) Remove advertisements Sponsored Links Scrutinizer View Public Profile Find all posts by Scrutinizer #2 04-17-2012 methyl Advisor Join Date: Mar 2008 Last Activity: 8 June 2016, 9:58 PM EDT Posts: 6,402 Thanks: 288 Thanked 676 Times in 645 Posts In the few cases where that does not apply, you may have used a Microsoft editor such as Notepad and corrupted the unix text file with Microsoft line terminators, and then transferred the file to unix using a BINARY mode ftp file transfer which unlike an ASCII mode ftp file transfer does not convert the format. Often the quickest fix is to re-transfer the file using the correct mode. In most versions of ftp giving the source file an MSDOS-type file extension of .txt will ma
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about
"nawk -v"
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up awk + fit syntax for SUN solaris & linux up vote 1 down http://www.unix.com/answers-to-frequently-asked-questions/182977-awk-bailing-out.html vote favorite need help about the following when I run the following command on linux its run fine awk -v NAME=MACHINE '$1 == NAME' /etc/hosts but on SUN Solaris I get the following: awk -v NAME=MACHINE '$1 == NAME' /etc/hosts awk: syntax error near line 1 awk: bailing out near line 1 how to fit the following syntax in order to fit also SUN Solaris? or change in order to http://stackoverflow.com/questions/3624748/awk-fit-syntax-for-sun-solaris-linux fit both on linux and SUN Solaris solaris share|improve this question edited Sep 2 '10 at 8:20 asked Sep 2 '10 at 7:48 lidia 828112838 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote accepted Solaris is well known for the fact that the some commands under /bin /usr/bin are not POSIX compliant. Instead they have additional compliant versions under /usr/xpg4 and similar hierarchies. Thus, under Solaris you can use just: /usr/xpg4/bin/awk -v NAME=MACHINE '$1 == NAME' /etc/hosts Under Solaris 10 this works. share|improve this answer answered Sep 2 '10 at 8:42 maxschlepzig 7,30534170 add a comment| up vote 0 down vote the simple way is to use nawk and the rest syntax share|improve this answer answered Sep 2 '10 at 8:47 lidia 828112838 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged solaris or ask your own question. asked 6 years ago viewed 1900
SERVICES Services Overview Education Services Business Critical Services Consulting Services Managed Services Appliance Services CUSTOMER CENTER Customer Center Support Community MyVeritas Customer Success Licensing Programs Licensing Process ABOUT About Corporate Profile Corporate Leadership Newsroom Research Exchange Investor Relations Careers https://www.veritas.com/support/en_US/article.000005525 Legal Contact Us English 中文(简体) English Français Deutsch Italiano 日本語 한국어 Português Español USA Site: Veritas Veritas PartnerNet awk: bailing out near line 1. Article:000005525 Publish: Article URL:http://www.veritas.com/docs/000005525 Support / Article Sign In Remember http://dbaspot.com/shell/414500-awk-syntax-error-near-line-1-awk-bailing-out-near-line-1-a.html me Forgot Password? Don't have a Veritas Account? Create a Veritas Account now! Welcome First Last Your Profile Logout Sign in to Subscribe Please sign in to set up your subscription. Close Sign syntax error In Print Article Products Article Languages Subscribe to this Article Manage your Subscriptions Problem awk: bailing out near line 1. Solution If you see error like below from engine_A.log, then you have to check if the AWK is old version. Error: 2010/02/17 17:28:29 VCS INFO V-16-2-13001 (system1) Resource(cvm_vxconfigd): Output of the completed operation (online) awk: syntax error near line 1 awk: bailing out near line syntax error near 1 You can check if AWK is old version like below: $ awk 1 /dev/null awk: syntax error near line 1 awk: bailing out near line 1 Solution: Upgrade awk to latest version. Terms of use for this information are found in Legal Notices.
Related Articles Article Languages x Translated Content Please note that this document is a translation from English, and may have been machine-translated. It is possible that updates have been made to the original version after this document was translated and published. Veritas does not guarantee the accuracy regarding the completeness of the translation. You may also refer to the English Version of this knowledge base article for up-to-date information. Attachment Products Subscribe to Article Search Survey Did this article answer your question or resolve your issue? No Yes Did this article save you the trouble of contacting technical support? No Yes How can we make this article more helpful? Email Address (Optional) Your feedback has been submitted successfully! Thank You! Sorry, we couldn't post your feedback right now, please try again later. Create/Manage Case QUESTIONS? CALL US: 1 (866) 837-4827 Solutions Unstructured Data Growth Multi-Vendor Hybrid Cloud Healthcare Government Products Backup and