OK, I fixed it!
It wasn't a syntax problem.
This is what I did:
I have a main script which creates a file. This file needs to create another file which is being "built" in a secondary script.
What I did, is that I wrote the "cat" part in the secondary script, and it didn't work, because the file was still in the making process.
Of course that I needed to cat, sort and uniq the file in the main script, and
over there to create "temp" which is my final output file.
This is why the cat command worked so well in the command line - because it printed out "temp" after all the process, whilst the cat command in the secondary script printed "temp" in the middle of the making.
I thank you both for your patience - System_Shock, you were really close!
, and nixnoob - you're awfully nice, I'm sorry I puzzled you.
Joey - I'm sorry I puzzled you as well.
The IOU coffee table:
--------------------------
Joey | 2
--------------------------
System_Shock | 1
--------------------------
nixnoob | 1
--------------------------
Shira.