Re: Problem with the -n option
Benno Schulenberg <[email protected]>
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Miki, [Please reply to the list only.] Op 14-01-18 om 15:38 schreef MikiStrange: > I'm trying to use th -n (--noread) option to write to openssl. What is it exactly that you want to do? To encrypt a file? To send a file from your filesystem through an encrypted channel to another machine? > I've made my named pipe which seems to be reading from Nano ok but I'm having > the following problems. > > If I write: nano -n gog > pipe2 (where gog is my file name) That will send *all* output from nano (the whole screen, the prompts, the help lines...) to the pipe2 thing, but *not* the contents of the file gog -- because a file is written only to where it was read from (unless you specify a different name). What's in the file gog? Because if you specify --noread (-n), then nano will not read "gog", so you might as well specify no filename at all. If you want to create in nano the content that you want to send to pipe2, then you would do: nano --noread pipe2 You type (or paste with the mouse) the stuff that you want to send, and then type ^S (or ^O <Enter>)... Aaah! Nano refuses to accept pipe2 as a file argument because it is not a normal file. :( That needs to be fixed. Thank for the indirect bug report. :) > If I write nano -n pipe2 > > Nano opens and warns me that pipe2 isn't a normal file, allows me to write > but when I save produces a file (which I can name during save) which is not > sent to openssl via the pipe. If the above bug were fixed, would that be enough to enable you to do what you want? Benno