mercredi 19 février 2020

alias with if else inside in csh

I want to write alias (csh) that work differently if there is more then 1 argument.

alias iftest 'if ($#argv > "1") \
      echo "oo" \
      else \
      echo "ii" \
      endif' \

But the code always print "oo"

What I'm doing wrong?

Aucun commentaire:

Enregistrer un commentaire