Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Does standard input redirection within a variable work differently on RHEL 7 than older versions.

    Posted on

    Hi there!

    I faced an interesting issue. The following code works well on RHEL 5, but drops an error on RHEL7:

    case $1 in
     a)
        *some code here*
        ;;
     b)
        *some code here*
        ;;
     c)
        v_rekord=$(sqlplus -s user/password

    Error:
    ./t2.sh: line 64: unexpected EOF while looking for matching `)'
    ./t2.sh: line 120: syntax error: unexpected end of file

    But it works well between backquotes:

    case $1 in
     a)
        *some code here*
        ;;
     b)
        *some code here*
        ;;
     c)
        v_rekord=`sqlplus -s user/password

    Is there an explanation or official statement for this?

    by

    points

    Responses

    Red Hat

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat, Inc.