Unix/Linux Go Back    


How to Post in the The UNIX and Linux Forums Tutorials for how to post and interact in the forums.

Syntax error near unexpected token `('

How to Post in the The UNIX and Linux Forums


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 2 Weeks Ago
ranabhavish ranabhavish is offline
Registered User
 
Join Date: Oct 2013
Last Activity: 9 May 2017, 7:38 AM EDT
Posts: 17
Thanks: 13
Thanked 0 Times in 0 Posts
Display Syntax error near unexpected token `('

I have 2 files like a.txt and b.txt and the content is as below


Code:
cat a.txt

810750125 117780 /BSCSQAT4A/bscsqat4a/lib/jar/wclt_common.jar
1803152428 13300 /BSCSQAT4A/bscsqat4a/lib/jar/WFMSSupportTool.jar
2663502779 67049 /BSCSQAT4A/bscsqat4a/lib/jar/wma.jar
687942896 665272 /BSCSQAT4A/bscsqat4a/lib/jar/wms.jar
3008319163 112859 /BSCSQAT4A/bscsqat4a/lib/jar/wsi.jar
519899054 23380 /BSCSQAT4A/bscsqat4a/lib/jar/xmlrpcsim.jar


Code:
cat b.txt 

3687886461 85113 /BSCSQAT_14/bscsqat3/lib/jar/soi.jar
2406203241 120149 /BSCSQAT_14/bscsqat3/lib/jar/soitool.jar
1673308243 79025 /BSCSQAT_14/bscsqat3/lib/jar/SOPSnmpDA.jar
729580466 251070 /BSCSQAT_14/bscsqat3/lib/jar/SOPStation.jar
4224805784 422225 /BSCSQAT_14/bscsqat3/lib/jar/stip.jar
1538233801 70571 /BSCSQAT_14/bscsqat3/lib/jar/UDRlibJNI.jar
810750125 117780 /BSCSQAT_14/bscsqat3/lib/jar/wclt_common.jar


I am using below command to get the difference after sorting both the files,


Code:
join -v 2 < (sort a.txt) < (sort b.txt)

but i am getting syntax error near unexpected token `('

Please help

Moderator's Comments:
Syntax error near unexpected token `('
Please wrap all code, files input & output/errors in CODE tags.
It makes it far easier to read and preserves multiple spaces for indenting or fixed-width data.

Last edited by rbatte1; 2 Weeks Ago at 09:06 AM.. Reason: Added CODE tags
Sponsored Links
    #2  
Old Unix and Linux 2 Weeks Ago
RavinderSingh13 RavinderSingh13 is offline Forum Advisor  
Registered User
 
Join Date: May 2013
Last Activity: 27 May 2017, 12:25 PM EDT
Location: Chennai
Posts: 2,477
Thanks: 552
Thanked 1,172 Times in 1,055 Posts
Hello ranabhavish,

Not sure what you are trying to do here but from error vice could you please try following commands(removing the space between < and ().

Code:
join -v 2 <(sort a.txt) <(sort b.txt)

Thanks,
R. Singh
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Syntax error near unexpected token `else' masubram Shell Programming and Scripting 14 08-02-2016 06:29 AM
Syntax error near unexpected token y33t Shell Programming and Scripting 14 11-29-2014 08:33 AM
Syntax error near unexpected token '(' sgradywhite Shell Programming and Scripting 7 09-15-2013 02:37 PM
Syntax error near unexpected token 'else' Ren_kun Homework & Coursework Questions 6 08-18-2011 05:40 AM
sh syntax error unexpected token done NullPointer Shell Programming and Scripting 5 04-30-2009 09:28 AM



All times are GMT -4. The time now is 04:41 AM.