On Thu, 2002-10-17 at 16:51, Daniel Harper wrote:
> OK I am a bit stumped, and awk is certainly not my forte
> 
> 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.
> 
> Does any-one have any ideas? Is there anyway I can get some debugging
> information from awk and vim to find out what is going on.

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.

It's kinda tricky to get around. If system doesn't provide a pty (and it
doesn't seem to) there isn't really a way you can make it. Which I find
more than a little surprising, although I guess it makes sense in the
context of what awk is.

I hate advising people to change the brand of car they drive when
there's a small problem with their current one, but I don't think (from
my brief reading of the man page) that awk will let you do what you
want. Can some awk guru please correct me on this?

I'd recommend using perl for this. Which I realise is probably not
particularly helpful. If you can give us a bit more info about what you
need done then we might be able to give you some perl snippets to help
you on your way.

Hope that isn't completely unhelpful :)

James.

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to