Bash: Syntax error: redirection unexpected

Posted by Werner on Stack Overflow See other posts from Stack Overflow or by Werner
Published on 2010-03-17T12:58:55Z Indexed on 2010/03/17 13:01 UTC
Read the original article Hit count: 345

Filed under:

I do this in a script:

read direc <<< $(basename `pwd`)

and I get:

Syntax error: redirection unexpected

in an ubuntu machine

/bin/bash --version
GNU bash, version 4.0.33(1)-release (x86_64-pc-linux-gnu)

while I do not get this error in another suse machine:

/bin/bash --version
GNU bash, version 3.2.39(1)-release (x86_64-suse-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

Why the error?

Thanks

© Stack Overflow or respective owner

Related posts about bash