sh_helper¶
Shell script variable support. Read and write syntax like export key="value"
in shell script.
- pysecret.sh_helper.export_pattern = re.compile('export [a-zA-Z0-9_]{1,128}="[\\d\\D]{1,128}"')¶
Limitation, key, value length can’t be greater than 128.
- pysecret.sh_helper.append_line_if_not_exists(path: str, line: str)[source]¶
Append a line to a text file at path if the line not exists in its content.
- Parameters
path – text file absolute path
line – text string.
- Returns
None