At 18 Oct 2002 07:20:22 +1000, James Gregory wrote: > On Thu, 2002-10-17 at 16:51, Daniel Harper wrote: > > I have an awk script the uses the system("vim " variablehere) > > function to call vim, the point being to edit a file manually and > > then get back to the awk script. > > > > Now when this runs I get a "Warning: Input is not from the > > terminal" from vim, and then it jumps straight back to the awk > > script. I am guessing that a filehandle is open or some sort or > > redirection is causing this but I am not to sure. > > I don't know much about awk, but my reading of that error message is > that vim is expecting to be started on a pty and awk's system call is > not providing it with one.
yep, from a quick test here it seems to work if you run the awk script itself "from a terminal", but not if you redirect the awk stdin/stdout to non-pty things. if you had to do that, you could always cheat and system(xterm -e vim) instead (or gvim or something), assuming X. -- - Gus -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug