1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

csh loop read variable from user input

Discussion in 'Shell Script' started by becon, Aug 28, 2010.

  1. becon

    becon New Member

    Aug 28, 2010
    Likes Received:
    Trophy Points:
    Dear all
    I would like to read the input from user

    echo "Please enter a number:"
    set cutoff = $< # C shell input from stdin
    cluster_struc validate_rmsd.disp $cutoff 4 | cat > file1.out
    cluster_struc validate_rmsd.disp $cutoff 4 | wc > file2.out

    then read the number of line of file1.out = $line_number
    then read the 2nd column of file2.out = $column
    if $column -($line_number * 3) < 100 then keep continuing reading the input from user.
    Could you please tell me how to do this in csh?
    Thank you very much.
    best regards

Share This Page