TW wrote:
Oh, I forgot how to pipe a single space character
echo -n " " > dospipe
Hi Mike,
From: Mike McCarty <Mike.McCarty@xxxxxxxxxxxxx>
$ man echo
[...]
-e enable interpretation of the backslash-escaped
characters
listed below
sorry if I totally misinterpret your post, but I think I do *not* want
to enable the escaped characters because the keystroke command
obviously expects to read the escape sequence, not the ascii value
I can't make sense out of this. You seem to be referring to a numeral
or something, but I can't tell. What do you mean by "the ascii value
that results from it"?
Please consider these results:
$ echo -n "033" | wc
0 1 3
$ echo -n "\033" | wc
0 1 4
$ echo -ne "\033" | wc
0 0 1
The first example passes three characters as output. They
are '0', '3', and '3'.
The second example passes four characters as output. They
are BACKSLASH, '0', '3', and '0'.
The third example passes one character as output, which
is the ESC character.
Isn't that what you want?
that results from it. Otherwise you would for example not be able to
send a carriage return, i.e.
I don't understand your objection. Do you or do you not
want the ESC character to appear in the input?
echo "keystroke \r" > dospipe
results in a carriage return in dosemu while
echo -e "keystroke \r" > dospipe
does not.
The -e enables conversion of the escape sequences of three
digit octal numbers into single characters in the output stream.
I'm just using echo here because it's easily reproducible by everyone.
I'm successfully using Ruby to remote control dosemu, but I can't
pipe the escape key for the named reasons, neither through echo nor
Ruby or whatever I may chose. Maybe there is a syntax that allows me
to pipe ASCII codes (e.g. 27 or hex 1B or octal 033 for the escape
key) into Dosemu, but I can't find it anywhere. The readme says
something about \^[:
You are using words in a way which is not consistent with a single
interpretation of each word.
\^x <Ctrl>x, where X is one of the usual C,M,L,[ ...
(e.g.: \^[ == <Ctrl>[ == ESC )
but I don't have luck with this. I tried several escape sequences
that could possibly be used, like \0x1B, \x1B, \033, \0033, still
nothing. What am I missing??
I don't know. It's difficult to interpret your language.
Let's try this. How about you describe, in careful detail, what
you want to happen, then describe in detail what you did, and
then describe in detail what you observed.
I have so far interpreted your request along these lines
I want an application running in a DOSEMU environment
to behave as if it received a hand typed ESC character.
I have tried using a pipe. I have used the echo command
in this manner
echo -ne "\033" > dospipe
and what the program running received was [fill in the blank].
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!
--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html