in reply to Re: Re: inconsisntency, if, expect, logs
in thread inconsisntency, if, expect, logs

The expect flags look correct, I guess my question is if you just dump the $exp->log_file to a normal file does the file contain an extra \n in the /bin/sh line(s)?

-Waswas
  • Comment on Re: Re: Re: inconsisntency, if, expect, logs

Replies are listed 'Best First'.
Re: Re: Re: Re: inconsisntency, if, expect, logs
by jcpunk (Friar) on Jun 13, 2003 at 19:28 UTC
    hmmmm, just tested that and no it does not.... looks just fine.
    /bin/sh $ root:x
    which is weird, but with Thelonius's comment I am able to parse out most of what i want to so im not terribly concerned. but i do still have one weird issue.

    i changed my if statement to an unless but i still get bin/sh at the top(

    bin/sh root:x:0:1::
    ), here is my unless if you desire to examine it
    unless( ($input eq "/bin/sh") || ($input eq "\$ ") || ($input eq "/") || ($input eq "bin/sh") )
    as for the strangeness of expect's loging perhaps just deciding that Sun's perl 5.8 package is slightly broken would be a good idea as I gave a friend a copy over lunch and his linux box doesn't generate the \n (just got an email from him on that)
      Does $|++; at the top of your script make any difference? Are you using 5.8 from sunfreeware.com, compiled yourself or a sun package? I have compiled my self and used sunfreeware all over the place and not seen this before. There has to be something wierd going on here this is not normal. also could you try a cat -v <filename> on that output file and see if there are any wierd characters in the /bin/sh line?

      -Waswas
        the $|++ solved it, out of blind ignorance might I inquire as to what that does?

        in regards to the package it was compiled by a former sysadmin here from source and then she turned it into a solaris package. so i am inclined to point to that as faulty.... unfortunatly i do not have the ability to get it changed, politics....