So I am new to bash scripting in Linux. My question is how can I check if the parameter is null or not null. If it is not null it should return 0 and if it is null it should return 1 and an echo "no parameters".
My code looks like this:
#!/bin/sh
while [ -n "$1"]; do
echo $1
shift
done