Enhancement of unix script [closed]

Bash is not very performant doing loops. Since you tagged the question python, python should be ok? def data_mask(col_val): mod = len(col_val) + sum(map(ord, col_val)) % 10 result = “” for i, ch in enumerate(col_val, mod + 1): absnum = abs(ord(ch) – i) if ‘A’ <= ch <= ‘Z’: ch = chr(ord(‘A’) + absnum % … Read more

Some troubles with using sed and awk [closed]

From what we can discern of this question, you’re attempting to create a programmatic rule to rename files ending in extensions stdout-captured, stderr-captured, and status-captured (assuming one typo) into files ending in extensions stdout-expected, stderr-expected, and status-expected, respectively. Obviously, if each of these definitions is inclusive of exactly one file, a rote mv may be … Read more