problem with script

Posted by lego69 on Stack Overflow See other posts from Stack Overflow or by lego69
Published on 2010-06-01T20:04:37Z Indexed on 2010/06/01 20:33 UTC
Read the original article Hit count: 132

Filed under:
|
|
|

I'm workin on C-Shell, can somebody help me find the bug, my script:

#! /bin/tcsh -f
cut -d" " -f2 ${1} | ./rankHelper

script rankHelper:

#! /bin/tcsh -f
set line = ($<)
while(${#line} != 0)
cat $line
set line = ($<)
end

file lines from which the data was sent:

053-3787837 038280083
052-3436363 012345678 
053-3232287 038280083 
054-3923898 033333333 
052-2222333 012345678 
052-1111111 012390387 

I run it using:

> ./rank lines

why do I receive only one number

038280083

I thought cut must cut 2 field from all rows... thanks in advance for any help I expect to see second field from all rows from lines

© Stack Overflow or respective owner

Related posts about programming

Related posts about scripts