Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I send input to /dev/ttyUSB0 and get its output. I'm trying to do this in bash script. Any ideas?

share|improve this question

closed as not a real question by dunxd, HopelessN00b, Michael Hampton, mdpc, voretaq7 Dec 4 '12 at 3:13

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I've read your question several times and still can't figure out what your trying to achieve. Can you clarify please. – Iain Dec 3 '12 at 8:50
I will explain it with screen: screen /dev/ttyUSB0 COMMAND output exit screen In such case I can do it with screen but I need a script to do it. – denizeren Dec 3 '12 at 8:54
up vote 1 down vote accepted

I solved this problem using pyserial library of python.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.