In my program In have a log directory. Name of the log directory is very long so in my python script I used hash function to get the unique code and append it to fixed string ie:
LOG_DIR = "abcdefghijklmnopqrstuvwxyz"
log_dir_hashed = hash(LOG_DIR)
new_log_dir = "log_%s" %log_dir_hashed
Since I am new to python please tell me if anything can go wrong with above code? also How to do similar thing in shell script so that result of the python directory name and shell directory name obtained after hashing is same.