How to do <cmd> file | hold file
Fabrice Le Metayer
fabrice at sj.ate.slb.com
Sat Sep 8 15:46:23 AEST 1990
In article <1727 at pbhyd.PacBell.COM> rjw at PacBell.COM (Rod Williams) writes:
>> ...suppose I want to sort a file
>>and place the result in the same file without destroying it,
>
>Doesn't 'sort' allow you to do this already in one easy step?
>
> sort -o<file> <samefile>
>
>...or did I misunderstand the question?
I use the following C-shell alias to get the output of a command into
the file it applies to. The command should be of the form "<cmd line> <file>".
alias apply \!\* \> /tmp/apply.\$\$ \; cp /tmp/apply.\$\$ \!\$
--
Fabrice
--
Fabrice Le Metayer DOMAIN : fabrice at sj.ate.slb.com
Schlumberger Technologies - ATE UUCP : {amdahl,decwrl,uunet}!sjsca4!fabrice
San Jose, CA 95110 BELL : (408) 437-5114
More information about the Comp.unix.shell
mailing list