I am having problems using unix tools that I usually use because I cannot use some characters in QSHell. For example, in linux, I can replace specific bytes on a file like this:
sed 's/l/\x81/' a.txt
In that case, I am replacing 'l' by the byte x81. However, in Qshell, I cannot use \x , for example,
printf '\x81'
Öx81
As we see, \x81 does not print as an 'a', which is the \x81 in EBCDIC, the encoding from iSeries. It doesn't even try to print a byte, it is printing a string of length 4...
What I am trying to do is simply using sed to replace the carriage return, by carriage return and new line and things like that. I realized that the character \ is not present in EBCDIC, as neither are {}. So, there are also some unix commands that use those characters that show an error in QShell. Please help, I cannot find a way to make things work online, so I am failing to write any script.
To make the question not ambiguous, I specifically need a way to printf a character using its hex representation in Qshell.
I am using PCOMM tn5250 to connect to the AS/400.