1. When executing sys.argv[1] in Python 3, the error IndexError: list index out of range occurs. See Figure 1.
![When executing sys.argv[1] in Python 3, the error IndexError: list index out of range occurs](https://media.shuijingwanwq.com/2022/10/1-4.png)
Plaintext
PS E:\wwwroot\object> python batch-remove-rediskey.py
Traceback (most recent call last):
File "E:\wwwroot\object\batch-remove-rediskey.py", line 27, in
match = sys.argv[1]+"*"
IndexError: list index out of range
2. sys.argv represents the command-line options you use when executing the script. sys.argv[0] is the name of the script you are running. All additional options are contained in sys.argv[1:]. Execute: python batch-remove-rediskey.py /tmp. The execution succeeds. See Figure 2.
![sys.argv represents the command-line options you use when executing the script. sys.argv[0] is the name of the script you are running. All additional options are contained in sys.argv[1:]. Execute: python batch-remove-rediskey.py /tmp. The execution succeeds](https://media.shuijingwanwq.com/2022/10/2-3.png)
Plaintext
PS E:\wwwroot\object> python batch-remove-rediskey.py /tmp
/tmp*
All done
