Home > Syntax Error > Awk Syntax Error Near Line 2

Awk Syntax Error Near Line 2

Contents

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 pan64 View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by pan64 10-11-2012, 04:16 AM #3 chrism01 LQ Guru Registered: Aug 2004 Location: I cant use nawk too. Why are some programming languages Turing complete but lack some abilities of other languages? Source

e.g. #!/usr/bin/bash #!/usr/bin/ksh 0 LVL 19 Overall: Level 19 Unix OS 9 Message Active 5 days ago Accepted Solution by:simon32702011-01-31 If it's working on all UNIX boxes apart from this I'm reasonably certain we can rewrite everything much more cleanly. also, does this anything to do with shell variables? If either fails you should actually post your code!

Awk Syntax Error Near Line 1 Awk Bailing Out Near Line 1

Which Unix does this particular box run? Will the medium be able to last 100 years? Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started share|improve this answer answered Sep 26 '11 at 8:47 Dimitre Radoulov 15.1k32231 Yeah i am using Solaris –Vijay Sep 26 '11 at 9:29 So try using nawk

  • The stability and usability make it a clear choice for servers and desktops (for the cunning).
  • Thank You!
  • Solved awk: syntax error near line 1 & awk: syntax error near line 1 Posted on 2011-01-29 Unix OS 1 Verified Solution 9 Comments 1,057 Views Last Modified: 2012-06-22 Hi, I
  • so the answer to your question would be; Yes! 0 Message Author Comment by:Crazycrux2011-01-31 My frist line is #!/usr/bin.
  • For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration.

Search this Thread 10-11-2012, 03:56 AM #1 Vthimmap Member Registered: Oct 2012 Posts: 32 Rep: Need solution for awk: syntax error near line 1 ERROR Using awk in kron Connect with top rated Experts 10 Experts available now in Live! Join the community of 500,000 technology professionals and ask your questions. Awk Syntax Error Near Line 1 Awk Bailing Out Near Line 1 Solaris If it is not in the man pages or the how-to's this is the place!

Drawing a star in AWT more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Line 2 Syntax Error Near Unexpected Token Newline Problem? or change in order to 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 My AccountSearchMapsYouTubePlayNewsGmailDriveCalendarGoogle+TranslatePhotosMoreShoppingWalletFinanceDocsBooksBloggerContactsHangoutsEven more from GoogleSign inHidden fieldsSearch for groups or messages To use Google Groups Discussions, please enable JavaScript in your browser settings, and then refresh this page. .

How rich can one single time travelling person actually become? "nawk -v" Featured Post How to improve team productivity Promoted by Quip, Inc Quip adds documents, spreadsheets, and tasklists to your Slack experience - Elevate ideas to Quip docs - Share Quip docs Browse other questions tagged solaris or ask your own question. This is a historical design error in MSDOS.

Line 2 Syntax Error Near Unexpected Token Newline

count )) ; then echo "No duplicates found in Posit pricing file" fi Finally, "awk" is really a language, not a program. My AccountSearchMapsYouTubePlayNewsGmailDriveCalendarGoogle+TranslatePhotosMoreShoppingWalletFinanceDocsBooksBloggerContactsHangoutsEven more from GoogleSign inHidden fieldsSearch for groups or messages current community blog chat Super User Meta Super User your communities Sign up or log in to customize your Awk Syntax Error Near Line 1 Awk Bailing Out Near Line 1 Or do you get the same error? /etc/sudoers Syntax Error Near Line 1 You are currently viewing LQ as a guest.

Just starting out and have a question? this contact form LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie [SOLVED] Need solution for awk: syntax error near line 1 ERROR User Name Remember Me? Join them; it only takes a minute: Sign up problem with shell variables in awk up vote 0 down vote favorite I have a command which is executed successfully on command This looks like the kind of thing you can do entirely in awk. Awk Bailing Out Near Line 1 Solaris

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Covered by US Patent. The mechanism of changing spin orientation TMP36, trouble understanding the schematic GTIN validation Is the empty set homeomorphic to itself? have a peek here or change in order to fit both on linux and SUN Solaris solaris share|improve this question edited Sep 2 '10 at 8:20 asked Sep 2 '10 at 8:15 lidia 179127 add

If you're on Solaris, for example, try running your script with nawk (or gawk), instead of awk. View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by David the H. 10-16-2012, 04:04 AM #6 Vthimmap Member Registered: Oct 2012 Posts: result=$( awk -F ',' '{ print $1 }' PositPricesUSA.csv.cp | sort | uniq -d ) echo "$result" count=$( echo -n "$result" | wc -l ) # "==" is a string test.

What are the consequences of driving a car with a fuel filter installed backwards?

Ensure template parameter is an enum class How to map and sum a list fast? Is there a good way to get from Levoča to Lviv? Join & Ask a Question Need Help in Real-Time? Article:000005525 Publish: Article URL:http://www.veritas.com/docs/000005525 Support / Article Sign In Remember me Forgot Password? Don't have a Veritas Account? Create a Veritas Account now! Welcome First Last Your Profile Logout Sign in

How rich can one single time travelling person actually become? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed I think it's safe to say we've all faced this error before... Check This Out You should at least specify the interpreter, not only a directory, which is useless at all.

GTIN validation Video displays in Star Wars How's the CMD trip bonuses from extra legs work? You may also refer to the English Version of this knowledge base article for up-to-date information. Not the answer you're looking for? pearl[[email protected]].293> ksh -vx test.sh Sep 26 1045 1145 #!/bin/ksh date1=$1 + date1=Sep date2=$2 + date2=26 time1=$3 + time1=1045 time2=$4 + time2=1145 ls -l| nawk -v d1=${date1} -v d2=${date2} -v t1=${time1} -v

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 ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor… Its working in all Unix box except this one... 0 LVL 68 Overall: Level 68 Unix OS 53 Message Active today Expert Comment by:woolmilkporc2011-01-31 Why can't you use nawk? An array might even be a better choice instead of a scalar variable.

Suggested Solutions Title # Comments Views Activity Prevent login on dead linux home directories 3 73 182d HP-UX Start Up Script KSH Cannot create 10 62 160d korn shell example requested If you need to reset your password, click here. share|improve this answer answered Sep 26 '11 at 13:37 Dimitre Radoulov 15.1k32231 add a comment| up vote 0 down vote Which operating system? How full is a gas cylinder?