waspsoft.com


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

Bash Command Substitution Syntax Error Near Unexpected Token

Contents

We can't answer your question if you don't give us all the data. bash shell-script process-substitution share|improve this question edited Nov 18 '14 at 8:32 Gilles 369k666681119 asked Nov 17 '14 at 17:28 Sudev Jash 2513 1 I am not able to reproduce All Rights Reserved. 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 this contact form

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 Because my bash 4.3.42(5)-release (x86_64-pc-msys) only refresh when you login in the specific directory and then it stuck with the branch name even if I change directories. –tvl May 26 at If I had to guess, I'd say something with the prompt (perhaps a quote missing, or something similar). –jszakmeister Nov 14 '15 at 20:25 add a comment| 1 Answer 1 active It may work on Linux/BSD, even the Windows version of Bash that comes with Git for Windows.

Bash Syntax Error Near Unexpected Token Done'

What does an 'ü' mean? Why can a Gnome grapple a Goliath? How to indicate you are going straight? What are the canonical white spaces?

  1. Unix & Linux Stack Exchange works best with JavaScript enabled current community chat Unix & Linux Unix & Linux Meta your communities Sign up or log in to customize your list.
  2. What does the "Phi" sign stand for in musical notation?
  3. Thanks for fixing it. –muru Nov 17 '14 at 20:52 You mean process substitution (<( echo foo )), not command substitution ($(echo foo)) (which is part of the POSIX
  4. UNIX is a registered trademark of The Open Group.
  5. is removed).
  6. 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
  7. Changed my PS1 to: PS1="\n${BBlack}\u@\h ${BRed}\w${BYellow}\$(__git_ps1 ' { %s }')${BGreen}"$'\n$ ' share|improve this answer edited May 26 at 0:21 answered Oct 19 '15 at 17:46 StefanoGermani 449211 Good find.
  8. Unexpected parent process id in output In a GNU C macro envSet(name), what does (void) "" name mean?
  9. How to map and sum a list fast?
  10. Unsupported environments should be ignored. 👍 1 munirwanis commented May 3, 2016 @fredyang @Tatsh I am using bash for windows.

If you'd like to contribute content, let us know. Find More Posts by theYinYeti 08-31-2010, 07:27 AM #3 dontob LQ Newbie Registered: Aug 2010 Posts: 6 Original Poster Rep: Hello boss, cpu.sh: line 4: $(awk {print'$2'} > new.txt): share|improve this answer answered May 6 at 14:20 Nickolay Merkin 1,17169 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign Bash Syntax Error Near Unexpected Token Fi' Password Linux - General This Linux forum is for general Linux questions and discussion.

What could cause the throttle to stick in my Ford Ranger? Now it throws this error: bash: command substitution: line 1: syntax error near unexpected token `)' bash: command substitution: line 1: `__git_ps1 ' { %s }')' Any idea on what is Join our community today! Is there a good way to get from Levoča to Lviv?

bash windows-10 ps1 share|improve this question asked Oct 19 '15 at 17:32 StefanoGermani 449211 add a comment| 1 Answer 1 active oldest votes up vote 6 down vote accepted I found Bash Syntax Error Near Unexpected Token Then' The simplified problem is that I can type echo `ls` and get the expected result. What do you get when you type both. This site is not affiliated with Linus Torvalds or The Open Group in any way.

Bash Syntax Error Near Unexpected Token Echo'

Main Menu LQ Calendar LQ Rules LQ Sitemap Site FAQ View New Posts View Latest Posts Zero Reply Threads LQ Wiki Most Wanted Jeremy's Blog Report LQ Bug Syndicate Latest Why? Bash Syntax Error Near Unexpected Token Done' Any idea? Bash Syntax Error Near Unexpected Token (' Ubuntu Looks weird, but it works.

This site is not affiliated with Linus Torvalds or The Open Group in any way. weblink druuna View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by druuna View Blog 08-31-2010, 07:57 AM #5 dontob LQ Newbie Registered: Aug If not, why? Skeletal formula for carbon with two double bonds Will the medium be able to last 100 years? Bash Syntax Error Near Unexpected Token Else'

Still seems odd that this is necessary when the same thing works fine on other platforms though. If it is Linux Related and doesn't seem to fit in any other forum then this is the place. 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) $ http://waspsoft.com/syntax-error/bash-for-syntax-error-near-unexpected-token.html So sayeth the Shepherd Skipping directly to level 4 Is the following extension of finite state automata studied?

Already have an account? Bash Syntax Error Near Unexpected Token Do' Please provide the commands/code snippet that seems to fail. Try invoke by bash script.sh.

Why does Windows show "This device can perform faster" notification if I connect it clumsily?

Password Protected Wifi, page without HTTPS - why the data is send in clear text? I also tried your solution of appending the $'\n$ ' to replace the new line with a dollar and that worked for me too! Meaning of "soul-sapping" Realism of a setting with several sapient anthropomorphic animal species Limit involving exponentials and arctangent without L'Hôpital Dennis numbers 2.0 Are there any 'smart' ejection seats? Bash Syntax Error Near Unexpected Token Newline' No, thanks

had to change a line in Git\etc\profile, restart console, works like a charm. –FloppyNotFound Nov 19 '15 at 10:28 When you use the double quote for the PS1="bla bla" Tatsh commented May 3, 2016 Well, I am not sure about that since my PS1 used on Linux and Mac does not seem to have this problem but it has \n Repaired. –Costas Nov 18 '14 at 14:22 add a comment| up vote 0 down vote I was trying to invoke the script as sh file.sh and was getting the error. http://waspsoft.com/syntax-error/bash-function-syntax-error-near-unexpected-token.html Rankin Oct 19 '15 at 18:33 helped me too, thanks!

GTIN validation Unexpected parent process id in output Convince people not to share their password with trusted others Is my workplace warning for texting my boss's private phone at night justified? Michael Durrant changed my edit to replace dash with bash. 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 You're welcome Please put the SOLVED tag on this thread (First post: Thread Tools pull down menu.