INSITU(1)		    General Commands Manual		     INSITU(1)

       insitu - modify files in place with shell commands

       insitu [1m-t22m] file command

       A  shell	 pipeline  cannot  both	 read  and write to the same file; for

	 cat foo | grep bar > foo

       will merely delete the contents of foo.

       Insitu wraps  a	shell  command,	 connecting  its  standard  input  and
       standard	 output	 to  the  file.	 If 4mcommand24m finishes successfully, the
       file will be truncated (or extended) to the size of the output produced
       by  the	command.   If 4mcommand24m returns a non-zero exit status, the file
       will not be truncated (unless -t is passed),  but  contain  the	output
       read  from the command, followed by the rest of the original file.  The
       part of the file overwritten by the command output will be lost.

       Insitu runs the command with '$SHELL -c 4mcommand24m', substituting  /bin/sh
       for $SHELL if the latter is not set.

       1m-t	22mtruncate 4mfile24m even if 4mcommand24m returns a non-zero exit status.

       insitu  returns	the  exit  status  of  4mcommand24m.   Additionally, 1m128 22mis
       returned if invalid flags are passed, 1m129 22mif 4mfile24m cannot  be  accessed,
       and 1m130 22mif the child process for running 4mcommand24m cannot be started.

       Insitu  is  a  dangerous	 and  brittle  tool that can easily cause data
       corruption if  the  command  fails  halfway  through.   Make  sure  you
       understand this risk before running it on important files.


				  insitu-1.0			     INSITU(1)