I have a docker Entrypoint script that looks like this:
#!/bin/sh
LABEL=$1
mkdir -p /backup/$LABEL
...
I can access the arguments passed in the normal bash way via $1, $2, etc. but I also need to know the number of arguments passed in. At first I thought I could do this like this:
if [ $# -eq 2 ];
then
However that does not work. Any ideas on how to retrieve the number of arguments?
TIA, Ole