Pages

mardi 21 février 2012

argv and csh

How can we check the number of arguments?

#!/bin/csh
echo There are $#argv arguments
echo First argument is $argv[1], second argument is $argv[2]
echo All of the arguments are $argv[*]

Aucun commentaire:

Enregistrer un commentaire