🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1102

Re: How to do <cmd> file | hold file

#1102
From: Joe Smith
Date: Sat, 08 Sep 1990 00:34
16 lines
1267 bytes
In article <2274@ns-mx.uiowa.edu> jlhaferman@l_cae07.icaen.uiowa.edu (Jeffrey Lawrence Haferman) writes:
>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

You can use "sort file -o file" for that particular problem.  (It's in the
man pages.)

In general, you have to find a suitable location to hold the file, then
mv it to the destination.  Buffering the entire file in RAM does not work
for large files.
-- 
Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C41    | BIX: smithjoe | 12 PDP-10s still running! "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."
Technical Details
Message-ID: <1215@tardis.Tymnet.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!tymix!tardis!jms
References: <2274@ns-mx.uiowa.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!tymix!tardis!jms
From: jms@tardis.Tymnet.COM (Joe Smith)
Newsgroups: comp.unix.shell
Subject: Re: How to do <cmd> file | hold file
Summary: sort file -o file
Message-ID: <1215@tardis.Tymnet.COM>
Date: 8 Sep 90 00:34:09 GMT
References: <2274@ns-mx.uiowa.edu>
Reply-To: jms@tardis.Tymnet.COM (Joe Smith)
Organization: BT Tymnet, San Jose, CA
Lines: 16