user1607856
user1607856

Reputation: 79

process substitution not working in ksh on AIX

The following loop runs perfectly in bash on Linux and Solaris but fails on AIX with default ksh:

while read -r line; do
    var1=$(...)
    var2=$(...)
    echo "$var1  $var2"
done < <(lsvgfs `lsvg | grep -v rootvg`)

with the following message:

0403-057 Syntax error at line 11 : `<' is not expected.

Upvotes: 1

Views: 1043

Answers (1)

Cyrus
Cyrus

Reputation: 88839

You can try this:

lsvgfs `lsvg | grep -v rootvg` | while read -r line; do
           var1=$(...)
           var2=$(...)
           echo "$var1  $var2"
done

Upvotes: 1

Related Questions