ksh – read: no query process

Home Questions ksh – read: no query process

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  admin 2 years, 1 month ago.

  • Author
    Posts
  • #6669 Reply

    admin
    Keymaster
    Online
    Topics: 65
    Replies: 65

    Hi All,

    I started to write a shell script in ksh (korn shell) on SunOS version.
    I added the below line to prompt and get user input.

    read -p "Enter the option:" input_variable

    But while executing I am getting the below error and script failed. I already used this type of read command Linux but not working in SunOS. Please provide how to run this read command in SunOS?

    ./script.ksh[16]: read: no query process

    Thanks in advance.

  • #6771 Reply

    admin
    Keymaster
    Online
    Topics: 65
    Replies: 65

    In Korn Shell, read -p command may not work as usual.

    Try below command in KSH to do the same action:

    echo "Enter the option:\c"
    read input_variable
    
Reply To: ksh – read: no query process

You can use BBCodes to format your content.
Your account can't use Advanced BBCodes, they will be stripped before saving.

Your information: