Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!math.lsa.umich.edu!emv From: emv@math.lsa.umich.edu (Edward Vielmetti) Newsgroups: news.newusers.questions Subject: Re: Viewing text files on FTP Message-ID: Date: 10 Jan 90 23:26:14 GMT References: <3510@hub.UUCP> Sender: news@math.lsa.umich.edu Organization: University of Michigan Math Dept., Ann Arbor MI. Lines: 25 In-reply-to: 6600zeek@hub.UUCP's message of 9 Jan 90 23:50:14 GMT In article <3510@hub.UUCP> 6600zeek@hub.UUCP (Josh Pritikin) writes: Is there a way to read files on FTP without 'get'ting them first? Can I activate vi and call up a remote file? -- Thanks If you have a Unix system you can do that, yup, more or less. Here's the trick, from the SunOS 4.0.3 man page (your mileage may vary). 2) If the first character of the file name is `|', the remainder of the argument is interpreted as a shell command. ftp then forks a shell, using popen(3S) with the argument supplied, and reads (writes) from the standard output (standard input) of that shell. If the shell command includes SPACE characters, the argument must be quoted; for example `"| ls -lt"'. A particu- larly useful example of this mechanism is: `dir | more'. I.e. you should be able to say get README "|more" get ls-lR.Z "|zcat|grep foobie" etc. --Ed