something wrong with this script??

Ok I'm writing a script that will do the following:

1) grep lines from a log file and output the grepped data to a file
2) cut a column range from the grepped output file
3) take the column of info that i cut and use uniq to tell the duplicates

here is what I wrote so far but I can't get it to work, i run it and it creates the output files but they are empty

#!/usr/bin/csh
#
#
grep "SendingTime: '2004" outgoing.11.05.04 > SendingTIMES

cut -c56-63 SendingTIMES > SEND

sort SEND | uniq -c | sort -r > DUPLICATES

try:

grep "SendingTime:" outgoing.11.05.04 | cut -c56-63 | sort -u > DUPLICATES

would be better.

if columns 56 thru 63 are blank, you will get nothing.
Also that code does not find duplicates. Use diff:

grep "SendingTime:" outgoing.11.05.04 | cut -c56-63 | sort > outfile 
sort -u outfile -o outfile1
diff outfile outfile1 > duplicates

What exactly are you trying to do?

As such, i too have not seen any problem in your command.

But, before redirecting to SendingTIMES try to print on stdout.

One more thing ,

You have ' in grep command. Please see the outgoing.11* file and
see that that is the same exact ' you have there.

it may be ` in the file. Just check .....