From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4ACB026E.4070409@maht0x0r.net> Date: Tue, 6 Oct 2009 09:40:14 +0100 From: matt User-Agent: Mozilla Thunderbird 1.0.6 (X11/20060326) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: <20091005192428.GA24445@nipl.net> <200910052204.aa92451@salmon.maths.tcd.ie> <13426df10910051922h6d40c1b2u5a8481db9a2a9b64@mail.gmail.com> In-Reply-To: <13426df10910051922h6d40c1b2u5a8481db9a2a9b64@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [9fans] mishandling empty lists - let's fix it Topicbox-Message-UUID: 8069f4ac-ead5-11e9-9d60-3106f5b1d025 You can build this whole dream using plan9 and show the world, you don't have to rewrite any of the utilities, just shape the calling convention to your liking. I bet you could even find the pattern and wrap the whole lot in a meta script, maybe even utilise an FS fn mkdir { if(! ~ $#* 0) /bin/mkdir $* ifs = ' ' m = `{read} while(! ~ $#m 0) { ifs = ' ' p = `{echo -n $m} /bin/mkdir $p ifs=' ' m = `{read} } } with no newlines in directory names >*On Mon, Oct 5, 2009 at 2:04 PM, John Stalker wrote: > > > >>`cat' would concatenate 0 files, i.e. ouptut nothing, >> >> > >cat would copy stdin to stdout > > > >>`chmod 755' would set the permissions of no files to 755, >> >> > >would read a list of files from stdin and change the modes > > > >>`cp foo/' would move no files to the directory foo, >> >> >would read a list of files from stdin and copy them. > > > >>`df' would show free disk space for no filesystems, >> >> >would read a list of file system names and df them. > > > >>`kill' would stop no processes, >> >> >would read a list of pids in and stop them. > > > >>`ln foo/' would hardlink no files into the directory foo, >> >> >would read a list of filenames in and ln them > > > >>`ls' would list no files (you would use `ls .' for the usual case), >> >> >would read a list of file names in and ls them. > > > >>`mkdir' would create no directories, >> >> >would read a list of file names in and mkdir them (I could really use this one) > > > >>`mv foo/' would move no files into the directory foo, >> >> >would read a list of file names in and mv them > > > >>`ps -U' would show no users' processes, >> >> >would read a list of user names in and ps them > > > >>`rm' would remove no files, >> >> >would read a list of file names in and rm them > > > >>and `sh' would execute no scripts in the Bourne shell. >> >> > >would read a set of commands from stdin and ... oh wait it does this. > >I prefer my version to your versions. I can see uses for them already. > >ron > > >