I want to test the number of arguments passed to a Linux shell script. If the number of arguments is not 2
or 4
, it should print something. Unfortunately it does not work. Can anyone explain what I am doing wrong?
#!/bin/bash
if [[ $# -ne 2 ]] || [[ $# -ne 4 ]];
then
echo "here";
fi