sort utility in script ?

Hi friends,

I want to use sort command in script. I used the following syntax in my scipt,

sort -t '|' +3 tempcdrext4.cdr > temp.mocdr

It give me a error " Input file specified two times."

but this command work fine in the prompt without any problem.

Can sombody please tell me who what is the problem.

I am using bash shell.

Regares,
Mahesh

Hi,

did You try

cat file1 | sort ... >file2

Best regards
Dieter

This is UUOC. What system are you running this on? Post the uname -a output and the script code. You would get much better help then.