Bashrc Syntax Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss syntax error unexpected end of file bash the workings and policies of this site About Us Learn more bashrc example about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow
Unexpected Eof While Looking For Matching `"'
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 .bashrc syntax error: unexpected end of file up vote 1 down vote favorite 1 I am getting an unexpected end of file error. I am not really sure how to fix it. # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions export PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]' export LS_COLORS='di=35;1' alias la='ls -lah' alias cdu='cd /home/hzhang/primary' #module load gnu-compilers/4.7.0 #module load mvapich3/gnu/1.7 .ls /opt/intel/Compiler/11.1/072/bin/ifortvars.sh intel64 #PATH=$PATH:/home/hzhang/primary/over2.2e/bin_dp:/home/hzhang/primary/foiltest PATH=$PATH:/opt/overflow/intel/serial/bin_dp/:/home/hzhang/primary/chimera2.1/bin_dp/:/u/primary/hzhang/pegasus/bin_dp export PATH ulimit -s unlimited linux bash share|improve this question edited Aug 13 '12 at 7:17 Pavan Manjunath 14.6k55992 asked Aug 13 '12 at 7:16 derry30 3113 2 Nothing apparent in that file, though .ls looks odd. Check /etc/bashrc –geirha Aug 13 '12 at 7:42 1 ... and assuming the .ls is typo only here, in the question, check the .../ifortvars.sh too. And you might want to enclose $PATH in double quotes, in case a PATH element contains some special characters (like brackets). –fork0 Aug 13 '12 at 8:11 as @tooboring4me mentions check if all lines including the last end in \n –mnagel Aug 1 '13 at 12:36 // , .bashrc loads several other files, like .bash_aliases. Check here for an example of this error that was fixed by editing another file: stackoverflow.com/questions/31211571/… –Nathan Basanese Jul 3 '
Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware [SOLVED] source bashrc -> syntax error: unexpected end of file User Name Remember Me? Password Slackware This Forum is for the discussion of Slackware Linux. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other http://stackoverflow.com/questions/11929705/bashrc-syntax-error-unexpected-end-of-file special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact http://www.linuxquestions.org/questions/slackware-14/source-bashrc-syntax-error-unexpected-end-of-file-851121/ us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. 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 guide, with exercises at the end of each chapter. 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. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. Page 1 of 2 1 2 > Search this Thread 12-18-2010, 03:50 PM #1 xri Member Registered: Aug 2002 Distribution: Slackware 14.1, Archlinux Posts: 279 Blog Entries: 11 Rep: source bashrc -> syntax error: une
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 http://unix.stackexchange.com/questions/235361/bashrc-file-syntax-error-near-unexpected-token Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can syntax error answer The best answers are voted up and rise to the top .bashrc file syntax error near unexpected token `(' up vote 1 down vote favorite I have been using the following lines in my bashrc file for quite some time now and suddenly now I have an error. Here are the lines: make() { /usr/bin/make "$@" 2>&1 | sed -E -e "s/error/ $(echo -e "\\033[31m" ERROR "\\033[0m"/g)" -e bashrc syntax error "s/warning/ $(echo -e "\\033[0;33m" WARNING "\\033[0m"/g)" return ${PIPESTATUS[0]} } Here is the error: bash: /home/username/.bashrc: line 175: syntax error near unexpected token `(' bash: /home/username/.bashrc: line 175: `make()' bashrc syntax-highlighting share|improve this question edited Apr 27 at 15:13 Anthon 47.4k1462125 asked Oct 11 '15 at 8:44 mchid 378210 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted You probably have an alias for make somewhere earlier in the files that bash reads on startup. Try alias -p to list them, and adding unalias make in front of the function. share|improve this answer answered Oct 11 '15 at 9:33 meuh 15.5k1729 add a comment| up vote 3 down vote The problem is not with your make function. When I paste your code into my .bashrc, it works fine. Think about any recent .bashrc changes you made, they may be the culprit. One thing that could help locating the problem is the -x option. Add set -x at the top of your .bashrc, then source it again if needed. When the problem comes up again, the shell will now give you much more useful context regarding the error. share|improve this answer answered Oct 11 '15 at 9:54 A.P. 9066 add a comment|