How to do <cmd> file | hold file

Jeffrey Lawrence Haferman jlhaferman at l_cae07.icaen.uiowa.edu
Sat Sep 8 03:57:59 AEST 1990


I had a shell script that used to perform what I have in the
subject line.  For example,  suppose I want to sort a file
and place the result in the same file without destroying it,
e.g.

   % sort file > tmp
   % mv tmp file

I would like a command 'hold' which would do the above via

   % sort file | hold file

Got a good one liner for this (in c-shell)?


Jeff Haferman                            internet: jlhaferman at icaen.uiowa.edu
Department of Mechanical Engineering
University of Iowa
Iowa City IA  52240



More information about the Comp.unix.shell mailing list