Home > Syntax Error > Bash Command Substitution Syntax Error Near Unexpected Token

Bash Command Substitution Syntax Error Near Unexpected Token

Contents

I can use both interactively. –user unknown Jan 5 '12 at 14:14 Line 78? Train ride from Copenhagen to Malmo Password Protected Wifi, page without HTTPS - why the data is send in clear text? What does the "Phi" sign stand for in musical notation? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed http://sovidi.com/syntax-error/bash-command-substitution-syntax-error-unexpected-end-of-file.php

Browse other questions tagged shell-script or ask your own question. So what is causing this error? You want non-literal \n for later processing when PS1 is rendered, which means the original line is not incorrect, just as you want \h (hostname) and not literally \h to show Blogs Recent Entries Best Entries Best Blogs Blog List Search Blogs Home Forums HCL Reviews Tutorials Articles Register Search Search Forums Advanced Search Search Tags Search LQ Wiki Search Tutorials/Articles Search

Bash Syntax Error Near Unexpected Token Done'

Good way to explain fundamental theorem of arithmetic? Did Donald Trump call Alicia Machado "Miss Piggy" and "Miss Housekeeping"? 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 Are you new to LinuxQuestions.org?

You should ask this sort of questions on Super User instead. –Léo Lam Nov 14 '15 at 20:06 Delete your .gitconfig file and try that command again. Check your .bash_profile (or any other config file). What are the canonical white spaces? Bash Syntax Error Near Unexpected Token Fi' But is there no $SHELL or similar variable?

compile bash need yacc which in bison you need exec version-check.sh before all. –user28132 Dec 1 '12 at 10:15 add a comment| up vote 2 down vote You need to make 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 special features. share|improve this answer answered Nov 17 '14 at 18:29 Sudev Jash 2513 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Thanks for the help @Tatsh Sign up for free to join this conversation on GitHub.

LinuxQuestions.org > Forums > Linux Forums > Linux - General [SOLVED] Repeatedly getting command substitution: line 3: syntax error near unexpected token User Name Remember Me? Bash Syntax Error Near Unexpected Token Then' Search this Thread 08-31-2010, 05:29 AM #1 dontob LQ Newbie Registered: Aug 2010 Posts: 6 Rep: Repeatedly getting command substitution: line 3: syntax error near unexpected token Hello mates Here, you don't need process substitution, you can use standard shell pipes: printf "%s\n" "TOP" | paste - - is the standard way to tell paste to read the data from Any idea?

Bash Syntax Error Near Unexpected Token Echo'

You're welcome Please put the SOLVED tag on this thread (First post: Thread Tools pull down menu. All Rights Reserved. Bash Syntax Error Near Unexpected Token Done' This site is not affiliated with Linus Torvalds or The Open Group in any way. Bash Syntax Error Near Unexpected Token (' Ubuntu Can I use an HSA as investment vehicle by overcontributing temporarily?

Thanks cemo commented Sep 22, 2015 duplicates #544 munirwanis commented May 2, 2016 I'm having the same problem and I don't think this is duplicated. his comment is here Looks weird, but it works. Maybe the problem is just with minGW decoding since you are using Cygwin bash and it works ok! I also tried your solution of appending the $'\n$ ' to replace the new line with a dollar and that worked for me too! Bash Syntax Error Near Unexpected Token Else'

more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science Is there a way to make a metal sword resistant to lava? You are currently viewing LQ as a guest. http://sovidi.com/syntax-error/bash-for-syntax-error-near-unexpected-token.php Last edited by dontob; 08-31-2010 at 05:32 AM.

Yves. Bash Syntax Error Near Unexpected Token Do' This may be some sort of weird bug with Bash for Windows. more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation

If you would like to refer to this comment somewhere else in this project, copy and paste the following link: Matthieu Vachon - 2014-08-22 Here my own PS1 that works: #

Is 8:00 AM an unreasonable time to meet with my graduate students and post-doc? My solution was to emit the linefeed using another function: function echonewline() { echo -e "\n " # last line must be non-empty - I emit a whitespace } PS1=\n...all...stuff...$(__git_ps1)...colors...$(echonewline) $ Password Linux - General This Linux forum is for general Linux questions and discussion. Bash Syntax Error Near Unexpected Token Newline' Force Microsoft Word to NEVER auto-capitalize the name of my company How could banks with multiple branches work in a world without quick communication?

ps -eo pmem,args | sort -k 1 | sed '$d' | tail -1 | awk '{ pint $2 > "new.txt" } { printf("%.0f\n", $1) }' I need to the get the asked 1 year ago viewed 4918 times active 1 year ago Related 0Shell script - syntax error near unexpected token `['2command not found and syntax error near unexpected token2bash: syntax error more hot questions question feed default about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation http://sovidi.com/syntax-error/bash-script-syntax-error-near-unexpected-token-do.php If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

W. Unexpected parent process id in output When taking passengers, what should I do to prepare them? Does mean=mode imply a symmetric distribution? more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation

Tatsh commented May 3, 2016 This repository targets Bash 4.x on OS X. Thanks for your effort dontob View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by dontob 08-31-2010, 08:02 AM #6 druuna LQ Veteran druuna View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by druuna View Blog 08-31-2010, 08:15 AM #7 dontob LQ Newbie Registered: Aug Rankin Oct 19 '15 at 18:33 helped me too, thanks!

If not, why? dontob View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by dontob 08-31-2010, 08:23 AM #8 Kenhelm Member Registered: Mar 2008 Location: N. no outgoing connection via ipv4 How would family relationships change if legal system uses collective punishment? If you're executing a script, post the whole script. –Gilles Jan 5 '12 at 23:49 @Gilles.

The name is put in a file (new.txt) and the number is outputted to screen (all behind the . Instead of running the command, run bash and pass the command to bash using -c: bash -c 'paste <(printf "%s\n" "TOP")' share|improve this answer answered Sep 10 '15 at 13:45 jgarbe Unix & Linux Stack Exchange works best with JavaScript enabled Skip to content Ignore Learn more Please note that GitHub no longer supports old versions of Firefox. It may work on Linux/BSD, even the Windows version of Bash that comes with Git for Windows.

file $(which sh) output /bin/sh: symbolic link to 'dash' –Costas Nov 17 '14 at 20:43 Costas, that's what I meant. Also, why the double $ in the awk commands? –glenn jackman Feb 28 at 3:29 1 Copy-paste from a Makefile perhaps? –Stephen Kitt Feb 28 at 8:15 add a comment| Is my workplace warning for texting my boss's private phone at night justified? Having a problem logging in?