[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vi or vim



Nathaniel Reindl wrote:

>On Sun, Jul 17, 2005 at 04:18:51PM -0500, bentley rhodes wrote:
>  
>
>>hey, i was reading the man on vi and i couldn't figure out how to enter 
>>text at the command prompt.  i am thinking it is:
>>    
>>
>
>Er, what exactly are you trying to do?  I'd help you, but I can't
>without knowing what sort of end you want to achieve.
>
>If it's an end that will allow you to spit some text into a file
>somewhere on disk, this will not suffice.  You would have better luck
>trying one of
>
>    echo "hello" > ~/text.txt
>
>or
>
>    cat > ~/text.txt <<EOF
>    hello
>    EOF
>
>to get what you want done.
>
>Vim is a visual editor, and as such, it really requires a sort of
>display in order to be useful (though, this isn't really all /that/ true
>if you're a masochist and feel like being reminiscent of TECO or
>similar).
>
>  
>
I want to write at a command prompt [such and such], and never have to 
open or save a text file. simply by saying the program name and a 
command, and the text i want in the file, *presto* it is in the text 
file saved somewhere that i specified. that way if i wanted to format my 
computer and have the install script i made insert lines of text into an 
existing or non-existing file somewhere, i can do so without ever having 
to open the thing as root and do the editing. i can simply use one 
script to do a lot of things for me, like putting text into an existing 
text file.

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.