Bash Bashrc Line Syntax Error Unexpected End Of File
Contents |
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki syntax error unexpected end of file bash script Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation syntax error unexpected end of file php User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu syntax error unexpected end of file wordpress Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] Terminal error bashrc syntax
Syntax Error Unexpected End Of File Shell Script
error unexpected end of file Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 4 of 4 Thread: Terminal error bashrc syntax error unexpected end of file Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch syntax error unexpected end of file python to Hybrid Mode Switch to Threaded Mode March 20th, 2014 #1 Luxx View Profile View Forum Posts Private Message Gee! These Aren't Roasted! Join Date Oct 2007 Beans 172 DistroUbuntu 14.04 Trusty Tahr Terminal error bashrc syntax error unexpected end of file bash: /home/v/.bashrc: line 129: syntax error: unexpected end of file This shows at the top of my terminal every time I open it. Things usually work fine in terminal, but I'm wondering what is going on with this message at the top. Interestly, there is no line 129 as .bashrc ends at line 128, although I'm not sure that should be unexpected. I haven't made any deliberate changes to it. Any ideas why I get this message at the top of my terminal or how to make it go away? Adv Reply March 20th, 2014 #2 steeldriver View Profile View Forum Posts Private Message Staff Emeritus Join Date Apr 2012 Beans 6,812 Re: Terminal error bashrc syntax error unexpected end of file Maybe there's a missing newline or some control characters that yo
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 syntax error unexpected end of file unix User Name Remember Me? Password Slackware This Forum is for the discussion of Slackware
Syntax Error Unexpected End Of File Laravel
Linux. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By
Syntax Error Unexpected End Of File Expecting Function (t_function)
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 special features. Registration is quick, simple and absolutely free. https://ubuntuforums.org/showthread.php?t=2212346 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 us. If you need to reset your password, click here. Having a problem logging in? http://www.linuxquestions.org/questions/slackware-14/source-bashrc-syntax-error-unexpected-end-of-file-851121/ 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: unexpected end of file I don't remember making any changes on any of these files on my account:.bashrc .bash_profile .bash_logoutHowever, when I log into my slack box through ssh from another place, I
#1 2013-08-27 22:56:14 MoonSwan Member From: Great White North Registered: 2008-01-23 Posts: 873 [Solved] Sourcing .bashrc gets "syntax error: unexpected end of file" I've looked at the wiki https://bbs.archlinux.org/viewtopic.php?id=168953 and the web as well as this forum for a clue as to why my .bashrc file spits out "syntax error: unexpected end of file." On boot-up my user http://unix.stackexchange.com/questions/259994/unexpected-end-of-file-in-bash-profile account gives me this error when I login to a TTY or open a terminal window. As a result, my nice prompt that I spent some time developing doesn't syntax error work and my prompt instead defaults to a prompt I put into /etc/bash.bashrc just for fun. That prompt gives you a smiley face if your last command worked or a frowny face if it failed. Should anyone wish to use it, here it is: PS1="$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;32m\]\u@\h'; fi)\[\033[01;34m\] \w \$([[ syntax error unexpected \$? != 0 ]] && echo \"\[\033[01;31m\]:(\[\033[01;34m\] \") \\$\[\033[00m\] " I am posting the original .bashrc file and one stripped of all extraneous material in the hope that my mistake is more easily found.My stripped down .bashrc I've used to try to debug this issueif [[ $- != *i* ]] ; then # Shell is non-interactive. Be done now! return ###Promts & Terminal theme is black on white ## name=dark purple; relative directory=medium purple; prompt=dark purple; font code=light grey PS1='\[\e[0;35m\]\u\[\e[m\]\[\e[0;37m\] \W\[\e[m\]\[\e[0;35m\] \$ \[\e[m\]\[\e[0;37m\]' ## erase duplicate entries in your history file ~HL June 2012 export HISTCONTROL=erasedups # TMUX if which tmux 2>&1 >/dev/null; then #if not inside a tmux session, and if no session is started, start a new session test -z "$TMUX" && (tmux attach || tmux new-session) fi ### ## sets the default editor to be nano export EDITOR="nano" ### ## You can enable code syntax coloring in less by installing "source-highlight" export LESSOPEN="| /usr/bin/source-highlight-esc.sh %s" export LESS='-R ' ### man() { env LESS_TERMCAP_mb=$(printf "\e[1;32m") \ LESS_TERMCAP_md=$(printf "\e[0;32m") \ LESS_TERMCAP_me=$(printf "\e[0m") \ LESS_TER
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 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 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 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 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 sur