I have some text files in EBCDIC that I want to add data to in EBCDIC.
I know I can use the dd commmand if I want to translate all the files from EBCDIC to ASCII, update it in ASCII, then convert it all back to EBCDIC. But I don't wish to do that in this case because many of the files have embedded binary data.
Right now I'm doing the following in a bash shell script to append a line in ASCII to $outfile (the output file):
Code:
echo './ ADD NAME='${1#./} >> "$outfile"
The ${1#./} is the input file name with the ./ stripped off the front of it. So if my script is passed a file name of ./XYZZY, it appends "./ ADD NAME=XYZZY" to the output file. The output file is mostly EBCDIC, so I'd like for that string to be in EBCDIC too, e.g., x'4b6140c1c4c440d5c1d4c57ee7e8e9e9e8'
Any ideas?