#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    14
    Rep Power
    0

    Exclamation Read command issues


    Looks like I am running into all sort of issues.
    I am trying to read from user input in a certain condition.
    The script doesn't wait for user input at all.

    Code:
    if [[ $COMMAND -eq 0 ]]; then 
                # read the Name from User
                echo "Please enter Name:"
                read NAME
                echo "Name read from user:"$NAME
    fi
    # Call the ksh file 
    ./callOtherScript.ksh $NAME


    The script prints
    Please enter Name:
    Name read from user:

    I tried with many combination of "read" command like read -rn 0 NAME. Still not working.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    14
    Rep Power
    0

    Is this ksh issue?


    Cause the same command read works in the console.
    Is that when I try to run the same command inside from a ksh script it doesn't work at all.

IMN logo majestic logo threadwatch logo seochat tools logo