Ascii to Char and Char to Ascii conversion
I am completely new to Unix scripting with zero knowledge in it and have the below scenario can you please help me with the complete working script,
1. Get the string input from the user
2. Convert it to ASCII
3. Increment each character's ASCII value by 2. If the input value contains Y or Z it should be converted to A or B accordingly, same way the string may have special characters and numbers as well and they must be converted accordingly.
4. Form the new word
5. Store this in a file
Input : ABCD
Output : CDEF
and this output should be stored at the Value 1 location in a file like,
Value 1 : CDEF
Value 2 : XYX
This file will act as a config file and should be used in another script 2
Script 2 should read these values and before proceeding it should convert it back to original value (i.e. ABCD - should perform the reverse operation).
This is something like encrypting and decryption but its very primary. I am not worried about any security issues by achieving this logic as i am going to implement it on some log files with no value.
I am on solaris 5.10