I/O redirection problem

From: Krit Kasemosoth (krit_kasemosoth_at_hotmail.com)
Date: 05/26/04


Date: 26 May 2004 04:32:20 -0700

I have data file 'test.txt'. I want to search text in that file and
store
  the result back to file 'test.txt'. The command that I execute is :

  cat test.txt | grep monday > test.txt

  I execute it on two machines that have same environment(same OS,
shell and utilities version).
  The command work on one machine (result of execution store in
'test.txt') but not work on another machine ('test.txt' is empty).
  
  What are the possible factors that make the command work ?
  (Because the command redirect output back to original file
   which must can not work)

  This is a information of my two machines :

  1. SunOS dev_24 5.8 Generic_108528-21 sun4u sparc SUNW,UltraAX-i2
  2. SunOS ceres 5.8 Generic_117000-01 sun4u sparc
SUNW,Ultra-Enterprise



Relevant Pages

  • Re: RPC Call
    ... >>> I have administrative rights to all of my machines on my network. ... I need to send an RPC command to my ... >>> machines in order to execute this application. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Console application will only run on machine where application was compiled
    ... This tells me that I have some type of a dependency issue, ... What error messagedo you see on the "Other" machines? ... The message is "The system cannot execute the command" or close to ...
    (microsoft.public.dotnet.framework)
  • Re: RPC Call
    ... >> I have administrative rights to all of my machines on my network. ... I need to send an RPC command to my ... >> machines in order to execute this application. ...
    (microsoft.public.win32.programmer.networks)
  • Re: RPC Call
    ... > I have administrative rights to all of my machines on my network. ... I need to send an RPC command to my ... > machines in order to execute this application. ...
    (microsoft.public.win32.programmer.networks)
  • [Full-Disclosure] Advanced usage of system() function.
    ... and call its arguments as a command for shell. ... as we can see we still didnt get what we want (typing exit ... Connection closed by foreign host. ... think what we want to execute. ...
    (Full-Disclosure)