Muthu
Answered On : Jun 2nd, 2005
$# will return the number of parameters that are passed as the command-line arguments.
Login to rate this answer.
Raj
Answered On : Jul 29th, 2005
$# means, number of positional parameters set

1 User has rated as useful.
Login to rate this answer.
Max
Answered On : Jun 15th, 2006
Print $#This will return the last command is run successfully or not.If it will return 0 then it ran successfully. And if it will return other then 0 thenThere is some problem
Login to rate this answer.
Srinivas
Answered On : Aug 10th, 2006
I think it is $? not $# which returns the status of the last executed command

1 User has rated as useful.
Login to rate this answer.
$# returns the number of parameters that are passed to a shell script
$? returns the exit code of the last executed command (0 : Successful, 1 or other: Failed)

2 Users have rated as useful.
Login to rate this answer.
By using $# parameter, the program checks whether the right number of arguments have been entered.

1 User has rated as useful.
Login to rate this answer.
Mo
Answered On : Apr 20th, 2012
$# : Stands for counts of the number of the positional parameters passed to a script.
example test.sh 1 2 3 4 5 6 7 , there are 7 paramaters as passed so the count of the $# is 7
Login to rate this answer.