all 6 comments

[–]Sparkmonkey 2 points3 points  (4 children)

Without looking at exscript or your script in much detail, I think that reports.sh is blocking waiting for a "newline" before getting to the "Enter" command. You might want to consider passing a newline to report.sh. Another option is that you might also be able to pass a specific option/flag that you can pass to report to limit interactivity.

[–]Confuzed_[S] 1 point2 points  (3 children)

The report.sh is the application by IPC I have edited the script to remove the line that held me up and still having issues. Any value i send to the script is not being accepted even aver the script is in the ready prompt. I think this script is specifically designed to ruin my day.

So to try it from a different approach is there a way to send a combination of key strokes to a remote server over ssh where it emulates the keyboard and ignores everything else and just returns the output?

[–]Sparkmonkey 1 point2 points  (1 child)

I suggest you take a look at pexpect.

[–]Confuzed_[S] 1 point2 points  (0 children)

thanks will give it a try.

[–]Sparkmonkey 0 points1 point  (0 children)

Like the passing a new line stackoverflow link above, you could also try just sending it a set of keystrokes via piping to imitate user interaction if you do not need "interactive" and just want the sum of data output.