#!/bin/sh input=$1 type=$2 # This is a function: # It checks if the user has input data. check() { if [ -n "$1" ]; then echo else echo "Please enter URL/File type."; exit 0 fi } check $input check $type echo $input echo $type #curl $input