diff options
author | schizoid <schizoidparty@aol.com> | 2024-12-09 11:53:26 -0500 |
---|---|---|
committer | schizoid <schizoidparty@aol.com> | 2024-12-09 11:53:26 -0500 |
commit | 55a29d21536323bf66ef57e8592a8299dc2b0dad (patch) | |
tree | de927b529ffccefae4aaa088b90de27bd53e74ab | |
parent | 7c874decb9920f4fcd9b762807131b4891c373d4 (diff) |
Added input checking function
-rwxr-xr-x | archive-dl | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -3,14 +3,19 @@ input=$1 type=$2 -check() -if [ -n "$input" ]; then +# This is a function: +# It checks if the user has input data. +check() { +if [ -n "$1" ]; then echo else - echo "Please enter URL"; + echo "Please enter URL/File type."; exit 0 fi +} +check $input +check $type echo $input echo $type |