feed text to a file editor from a named pipe
Hi Guys,
Does any one know how can i input text by reading from a named pipe to any popular GUI based text editor? what i am doing is Quote:
and i want to do Quote:
I am able to do Quote:
Thanks |
If all you want to do is get the editor started with a skeleton file, then why not just create the file, and start the editor with the file as a commandline argument?
Any method you come up with to provide the interactive input to the text editor from some source of your own contrivance will inevitably end up the way you've encountered with gvim. The editor, no matter what it is, is reading a single input source. When you replace that source with something you create, the editor cannot know when it should start reading elsewhere. --- rod. |
HiNbomr,
I am doing some stuff in my perl script,and the output is sent to a named pipe,the script later is supposed to do an exec("file editor") and display the contents read from named pipe to the user.since the o/p is not fixed,i cant use a skeleton file for this. |
If you can send data into a pipe, you can send it to a file. Almost zero difference.
--- rod. |
Yes,you are right.May be i should get rid of a named pipe and use a text file instead. Thanks for the help.
|
In the bash shell:
$EDITOR <(cat fifoname) The user would have to "save as". Seems like an odd way of doing it. Consider creating the file on the fly with a HERE document, using variables for values you had prompted the user for. |
All times are GMT -5. The time now is 06:03 PM. |