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
dos2unix: converting file rank to UNIX format ...
> ./rank lines
>
> cat -A rank
#! /bin/tcsh -f$
cut -d" " -f2 ${1} | ./rankHelper
> cat -A rankHelper
#! /bin/tcsh -f$
set line = ($<)$
$
$
while(${#line} != 0)$
$
echo $line$
set line = ($<)$
end