Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can vi write to STDOUT?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Oo.et.oO
Apprentice
Apprentice


Joined: 23 Apr 2002
Posts: 291
Location: burlington

PostPosted: Sat Feb 15, 2003 2:29 am    Post subject: can vi write to STDOUT? Reply with quote

hi all,
i searched and searched and can't figure out if vi or vim can write to standard out when used as normal (:wq in command mode)

i am writing a script which takes a blurb on the command line OR spawns the $EDITOR to take the blurb. how does one easily do this, like cvs does without the -m option?

i'm trying to do this without an intermediate temp file (that would be too easy).

BTW i'm doing the parent script in perl and this is way too complicated for the script's use. but now i'm curious. :-D

thanks!
Back to top
View user's profile Send private message
David_Escott
l33t
l33t


Joined: 12 Jan 2003
Posts: 952
Location: Boston, MA

PostPosted: Sat Feb 15, 2003 2:36 am    Post subject: Reply with quote

if an intermediate file is too easy then why not do it that way. But i seriously doubt that anyone would have bothered to add this feature as it would require vi to write create a null file, disable all write commands, and upon exit cat the memory location which anyone knowledgeable to know how to do all that would realize is simply easier to do by having vi write to a temporary file and then when vi exits cat the file just by doing

vi $temp && cat $temp
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum