Bash_profile Line 15 Syntax Error Unexpected End Of File
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings .bashrc line syntax error unexpected end of file and policies of this site About Us Learn more about Stack Overflow syntax error unexpected end of file bash the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation unexpected eof while looking for matching `"' 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
Bashrc Example
only takes a minute: Sign up Redhat linux .bash_profile: line 12: syntax error: unexpected end of file up vote 0 down vote favorite I use redhat linux and get problem: .bash_profile: line 12: syntax error: unexpected end of file .Bashrc # .bashrc # User specific aliases and functions export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45 export JRE_HOME=/usr/lib/jvm/jdk1.6.0_45/jre export PATH=$PATH:/usr/lib/jvm/jdk1.6.0_45/bin:/usr/lib/jvm/jdk1.6.0_45/jre/bin alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi and Bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH Could you tell me how to fix this problem? Thanks linux bash redhat share|improve this question asked Jan 7 at 14:09 Zon 274 1 Do either of those files have DOS line-endings? See point one on the bash tag wiki. –Etan Reisner Jan 7 at 15:26 @EtanReisner thanks for your help. –Zon Jan 8 at 2:30 Was that the problem? –Etan Reisner Jan 8 at 15:13 I use dos2unix bash file to solved problem :) –Zon Jan 15 at 2:18 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up
line 14: syntax error: unexpected end of file .bashrc: line 14: syntax error: unexpected end of file This are the contents of my files: .bash_profile: # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH .bashrc: # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions export PATH=$HOME/bin:$PATH export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH export CFLAGS=$HOME/include:$CFLAGS export http://stackoverflow.com/questions/34657219/redhat-linux-bash-profile-line-12-syntax-error-unexpected-end-of-file LDFLAGS=$HOME/lib:$LDFLAGS .bashrc ssh .bash_profile asked 18 Oct '15, 09:35 Raquel López... 11●1 accept rate: 0% One Answer: active answersoldest answersnewest answerspopular answers 0 Problem solved!! Searching an answer for another problem this posts solves my problem: https://community.webfaction.com/questions/5849/cgi-troubles permanent link answered 18 Oct '15, 11:00 Raquel López... 11●1 accept rate: 0% Your answer toggle preview community wiki: Follow this questionBy https://community.webfaction.com/questions/19088/bash_profile-unexpected-end-of-file Email:Once you sign in you will be able to subscribe for any updates hereBy RSS: Answers Answers and Comments Markdown Basics *italic* or _italic_ **bold** or __bold__ link:[text](http://url.com/ "title") image?![alt text](/path/img.jpg "title") numbered list: 1. Foo 2. Bar to add a line break simply add two spaces to where you would like the new line to be. basic HTML tags are also supported learn more about Markdown Question tags: ssh ×95 .bashrc ×1 .bash_profile ×1 question asked: 18 Oct '15, 09:35 question was seen: 784 times last updated: 18 Oct '15, 11:00 Related questions Svn, ssh, and multiple users SSH Tunnel for remote database access SSH timeout ssh login with main account Problem with SSH access for additional user Edit remote file locally with a text editor on Windows -bash: fork: Resource temporarily unavailable Problem with SSH copying *contents* of one folder into another via terminal SSH isn't working anymore O WEBFACTION Home Sign up Jobs REACH US Email Blog Twitter Facebook Google+ SUPPORT Control panel Documentation Q&A community site Status blog Support tickets AFFILIATE PRO
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 Stack Overflow the company Business Learn more about hiring developers http://unix.stackexchange.com/questions/259994/unexpected-end-of-file-in-bash-profile 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 https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1191 takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Unexpected end of file in .bash_profile up vote 0 down vote favorite When syntax error I do source ~/.bash_profile I get this "line 14 syntax error: unexpected end of file" error, I tried to delete the last line for no avail. Thanks # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi if [ -f ~/.git-completion.bash ]; then source ~/.git-completion.bash fi PS1='\[\e[0;36m\]\W\[\e[m\]\[\e[1;31m\]\$\[\e[m\]' if [ "$PS1" ]; then PS1="[\e[0;36m]\W\n[\e[m][\e[1;31m]\$[\e[m]" fi function gi() { curl -L -s https://www.gitignore.io/api/$@ ;} export LSCOLORS=cxfxcxdxbxegedabagacad bash shell share|improve this question edited Feb 5 at 23:12 Gilles 369k666681119 asked syntax error unexpected Feb 4 at 23:51 Fred J. 1174 1 Why to test PS1 if you have just set it ? It's always true. source and . command are same. –kshji Feb 5 at 17:35 1 [ "$PS1" ] && echo "PS1 value is $PS1" –kshji Feb 5 at 17:44 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote There's a missing semicolon: if [ "$PS1" ]; then PS1="[\e[0;36m]\W\n[\e[m][\e[1;31m]\$[\e[m]" fi should be if [ "$PS1" ]; then PS1="[\e[0;36m]\W\n[\e[m][\e[1;31m]\$[\e[m]"; fi or, format it the same way as your other if statements above this one. share|improve this answer answered Feb 4 at 23:58 mtklr 151114 I did that and removed the last list as well. but now I am not getting the prompt when starting the terminal. Just the first line (Last login: somedate ttys002) –Fred J. Feb 5 at 0:04 A couple of things. For me, The only thing in my .bash_profile is ". ~/.bashrc". .bashrc contains PS1 setting, and everything else. I don't test for PS1, I just set it. Also, you need to put backslashes before each bracket surrounding your escape codes in PS1. For your prompt to work the way you want, it should be PS1='\[\e[36m\]\W\n\[\e[1;31m\]\$\[\e[0m\]'. Hope that helps - matt –mtklr Feb 5 at 13:35 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
Issues 429 Merge Requests 68 Network Create a new issue Builds Commits Issue Boards Closed Open Issue #1191 opened 2016-04-04 11:34:04 UTC by Miklos Espak@mespak .bash_profile not executed in 1.1.0 After upgrading from 1.0.4 to 1.1.0, the .bash_profile and .bashrc files are not executed any more. We use .bash_profile to set some environment variables, so this broke our builds. Was this change intentional? If yes, shall we move setting the environment variables to the runner config? For now I downgraded to 1.0.4 and locked the version with yum-versionlock. After upgrading from 1.0.4 to 1.1.0, the .bash_profile and .bashrc files are not executed any more. We use .bash_profile to set some environment variables, so this broke our builds. Was this change intentional? If yes, shall we move setting the environment variables to the runner config? For now I downgraded to 1.0.4 and locked the version with yum-versionlock. Edited 2016-09-09 14:48:29 UTC 1 0 Kamil Trzciński @ayufan commented 2016-04-04 13:22:44 UTC Master Nope. This appears to be an error. Davide Taviani @helios commented 2016-04-05 08:28:32 UTC Yeah this is pretty unfortunate. RVM is not picked up anymore Kamil Trzciński @ayufan commented 2016-04-05 08:51:17 UTC Master Could you check the Bleeding Edge release? It should be fixed there. Fred Cox @mcfedr commented 2016-04-05 13:31:41 UTC I use .profile which works Davide Taviani @helios commented 2016-04-06 13:18:44 UTC @ayufan I get gitlab-ci-multi-runner 1.2.0~beta.19.g348b700 (348b700) Using Shell executor... /bin/bash: line 7: unexpected EOF while looking for matching `'' /bin/bash: line 8: syntax error: unexpected end of file ERROR: Build failed: exit status 2 with bleeding edge. It works with 1.0.4 Kamil Trzciński @ayufan commented 2016-04-06 13:54:26 UTC Master Hmm, strange does it happen on 1.1.1 too? What version of bash are you using? Davide Taviani @helios commented 2016-04-06 14:10:38 UTC @ayufan Also does not work with 1.1.1. I'm using (on Ubuntu 14.04) GNU bash