Solved what does $# mean in unix

February 6, 2012 at 02:01:36
Specs: Windows Vista
i was reading some script, cudnt understand ,"if [ $# -ne 2 ] "

See More: what does $# mean in unix

Report •

#1
February 6, 2012 at 03:38:45
$ means logged in as root.
# means logged in as a standard user.

Report •

#2
February 6, 2012 at 04:03:49
✔ Best Answer
In a shell script $# represents the number of parameters passed to the script. It looks like, in your case, the script expects two parameters and takes some special action if a different number is passed.

It's nothing to do with who you are logged in as.


Report •

#3
February 7, 2012 at 23:55:58
Thnx ijack..

Report •
Related Solutions


Ask Question