Quantcast
Viewing all articles
Browse latest Browse all 6112

Bash: Syntax error: redirection unexpected

I do this in a script:

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

and I get:

Syntax error: redirection unexpected

in an ubuntu machine

/bin/bash --versionGNU 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 --versionGNU bash, version 3.2.39(1)-release (x86_64-suse-linux-gnu)Copyright (C) 2007 Free Software Foundation, Inc.

Why the error?


Viewing all articles
Browse latest Browse all 6112

Trending Articles