If Unmatched Error In Unix
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta ksh syntax error if' unmatched Discuss the workings and policies of this site About Us Learn more syntax error << unmatched about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack dos2unix 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 ksh syntax error: `if' unmatched up vote 0 down vote favorite I'm new in ksh world and I have a problem right now with a script. The script under this lines is into the .profile file of a user in a UNIX machine and when I try to connect whith him i get always the error home/userTest/.profile: syntax error: `if' unmatched I don't know how to solve this, because I suppose that this scripts defines the prompt for the connected user, and if I have this error the prompt only shows "$" I tried the command ksh -n /home/userTest/.profile and I get the error always in the last line of the file #!/bin/ksh # ksh example if [[$0 = "ksh"]]; then bash exit $? fi if [[$0 = "-ksh"]]; then bash --login exit $? fi export LOGIN=$LOGNAME #prompt config PS1="$LOGIN@"$(hostname)":$PWD" if [["$(id -u)" = "0"]]; then export PS1="$PS1# " else export PS1="$PS1> " fi #Alias utile alias ll="ls -la" #Set any export here export PATH_EXAMPLE=/home/userTest export JAVA_HOME=$PATH_EXAMPLE/games/java/current export PATH=$JAVA_HOME/bin:$PATH How can I solve this problem ? Thanks. syntax syntax-error ksh share|improve this question asked Feb 26 at 10:29 ibaneight 2301213 I did not received any error when I have copied you code as it is and run a check with "ksh -n" . which ks
Things Small and Medium Business Service Providers All Solutions Services Advise, Transform and Manage Financing and Flexible Capacity IT Support Services Education and Training Services All Services Products Integrated Systems Composable Systems Converged Systems Hyper Converged Systems Blade Systems Infrastructure Management Software Application Lifecycle Management Application Delivery Management Big Data Analytics DevOps Enterprise Security Hybrid and Private http://stackoverflow.com/questions/35649271/ksh-syntax-error-if-unmatched Cloud Information Governance Information Management IT Service Management Operations Management Server Management Software as a Service (SaaS) Software-Defined Data Center Storage Management All Software Servers Rack Servers Tower Servers Blade Servers Density Optimized Mission Critical Servers Servers for Cloud Server Management All Servers https://community.hpe.com/t5/System-Administration/if-is-not-matched-message-in-shell-script/td-p/2814912 Storage All-flash and Hybrid Storage Midrange and Enterprise Storage Entry Storage Systems Data Availability, Protection and Retention Software Defined Storage Management and Orchestration Storage Networking All Storage Networking Switches Routers Access Points and Controllers Wireless LAN Campus and Branch Networking Data Center Networking Wide Area Network Software Defined Networking Network Functions Virtualization Network Management All Networking About UsSupportClearType to search2086159Solutions Transform to a Hybrid Infrastructure Protect Your Digital Enterprise Empower the Data-Driven Organization Enable Workplace Productivity Cloud Security Big Data Mobility Infrastructure Internet of Things Small and Medium Business Service Providers All Solutions Services Advise, Transform and Manage Financing and Flexible Capacity IT Support Services Education and Training Services All Services Products Integrated Systems Composable Systems Converged Systems Hyper Converged Systems Blade Systems Infrastructure Management Software
Technology and Trends Enterprise Architecture and EAI ERP Hardware IT Management and Strategy Java Knowledge Management Linux Networking Oracle PeopleSoft Project and Portfolio Management SAP SCM Security http://businessintelligence.ittoolbox.com/groups/technical-functional/sas-l/korn-shell-script-4293671 Siebel Storage UNIX Visual Basic Web Design and Development Windows < Back CHOOSE A DISCUSSION GROUP Research Directory TOPICS Database Hardware Networking SAP Security Web Design MEMBERS Paul_Pedant DACREE MarkDeVries MacProTX VoIP_News Inside-ERP Inside-CRM I_am_the_dragon maxwellarnold Michael Meyers-Jouan TerryCurran Chris_Day Andrew.S.Baker Ramnath.Awate JoeTorre bracke Locutus Dennis Stevenson Craig Borysowich Richard DukeGanote mircea_luca iudithm Clinton Jones Nikki Klein AbhaiTripathi Iqbalyk bluesguyAZ59 blrvenkat jakarman COMPANIES syntax error Hitachi America, LTD Imation Hewlett Packard ShoreTel View All Topics View All Members View All Companies Toolbox for IT Topics Business Intelligence Groups Ask a New Question SAS For discussion on SAS , please visit the Business Intelligence - General Discussions group. More Business Intelligence Groups Your account is ready. You're now being signed in. Solve problems - It's Free Create your account if unmatched error in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters. No spaces please The Profile Name is already in use Password Notify me of new activity in this group: Real Time Daily Never Keep me informed of the latest: White Papers Newsletter Jobs By clicking "Join Now", you agree to Toolbox for Technology terms of use, and have read and understand our privacy policy. Korn Shell Script PingMe asked Jul 6, 2011 | Replies (9) I am new to scripting and trying to execute this script. The goal is to capture errors in an error log when executing SAS programs. The script is as follows: #!/bin/ksh curtime=`date` errorfile=/sasproject/test/errorlogfile rm -f $errorfile echo $curtime > $errorfile cd /sasproject/test /sas/sas9.2/install/SASFoundation/9.2/sasexe/sas ./lookup_tables.sas error=`grep -i error Lookup_Tables.log | wc -l` if [ $error -gt 0 ] then echo "lookup_tables.sas error: $error" >> $errorfile fi echo " The end of automation procedure " >> $errorfile The error message is as follows: [1] 28195 : [No such file or directory]/test> ./test3.ksh[6]: cd: /sasproject/test .sas.: Invalid file, /sasproject/test/lookup_tables.sas grep: Lookup_Tables.log: No such fil