Article View: comp.unix.shell
Article #1104Re: How to do <cmd> file | hold file
From: Fabrice Le Metayer
Date: Sat, 08 Sep 1990 05:46
Date: Sat, 08 Sep 1990 05:46
20 lines
1202 bytes
1202 bytes
In article <1727@pbhyd.PacBell.COM> rjw@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@sj.ate.slb.com
Schlumberger Technologies - ATE UUCP : {amdahl,decwrl,uunet}!sjsca4!fabrice
San Jose, CA 95110 BELL : (408) 437-5114
Technical Details
Message-ID:
<1990Sep8.054623.3822@sj.ate.slb.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!sjsca4!fabriceShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!sjsca4!fabrice From: fabrice@sj.ate.slb.com (Fabrice Le Metayer) Newsgroups: comp.unix.shell Subject: Re: How to do <cmd> file | hold file Message-ID: <1990Sep8.054623.3822@sj.ate.slb.com> Date: 8 Sep 90 05:46:23 GMT Sender: news@sj.ate.slb.com Reply-To: fabrice@sj.ate.slb.com Organization: Schlumberger ATE, San Jose Lines: 20