csh loop read variable from user input

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

  1. becon

    becon New Member

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

    #!/bin/csh
    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
    becon
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice