summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschizoid <schizoidparty@aol.com>2024-12-09 11:53:26 -0500
committerschizoid <schizoidparty@aol.com>2024-12-09 11:53:26 -0500
commit55a29d21536323bf66ef57e8592a8299dc2b0dad (patch)
treede927b529ffccefae4aaa088b90de27bd53e74ab
parent7c874decb9920f4fcd9b762807131b4891c373d4 (diff)
Added input checking function
-rwxr-xr-xarchive-dl11
1 files changed, 8 insertions, 3 deletions
diff --git a/archive-dl b/archive-dl
index 229ec9d..cbf4b93 100755
--- a/archive-dl
+++ b/archive-dl
@@ -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