this is simple script which i want to read first and second argument somehow its not reading the second argument and throwing error stating pass the value.
Here is the script //I want to clone the git
$cat test.sh
#!/usr/bin/env bash
clone () {
git clone $2
}
case $1
in
clone) clone ;;
*) echo "Invalid Argument passed" ;;
esac
Running the script
$./test.sh clone https://github.com/sameerxxxxx/test.git/
fatal: You must specify a repository to clone.
usage: git clone [<options>] [--] <repo> [<dir>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--progress force progress reporting
clone()without arguments...