From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 23 Sep 2009 01:06:39 +0800 Message-ID: <140e7ec30909221006l38e4ead7y7192d5607f04f316@mail.gmail.com> From: sqweek To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] <> operator Topicbox-Message-UUID: 753c23a2-ead5-11e9-9d60-3106f5b1d025 2009/9/17 Rudolf Sykora : > Hello, > > is the <> operator a feature only of native plan 9? > It doesn't seem to work for me in p9p... > Is the right solution then, instead of > > program <> file > > write > > program < file > file_tmp > mv file_tmp file It works fine in p9p, however it doesn't do what you want it to do. <> opens a file for reading and writing, on a single file descriptor (default 0 iirc). You can then duplicate that to stdout (>[1=0]) so the process is reading and writing to the same file, but I'd be very surprised if that satisfies your requirements. The tmp file trick is the most reliable idiom for this task, as far as I'm aware. -sqweek