Tag:Edition point

  • The script cleans some Linux files regularly

    Time:2021-7-16

    method 1. New script_ Name. Sh, the file cleaning command is as follows #!/bin/sh find /var/mqm/errors/ -name ‘*.py’ -exec rm -rf {} \; If there are multiple files to be cleared, *. Py should be enclosed with single quotation marks; And; There must be no space in the middle, here is the function of escape; […]

  • Argparse usage of Python Library

    Time:2021-5-29

    Argspark is the standard module of Python command line parsing Download address:https://pypi.org/project/argp… code import argparse Parser = argparse. Argumentparser (description =’a number passed in the command line ‘) parser.add_ Argument (“square”, help = “please enter a number”, type = int) parser.add_ argument(“input_ STR “, help =” please enter a letter “, type = STR) args […]