in reply to help me...named pipe

You either need two threads or two scripts running as reader and writer of your pipe. Otherwise a pipe makes no sense.

A pipe is a communication device, like the postal service or the telephone. Without at least two independent entities (people, processes, threads) there is no reason to communicate.