What is $* and $# in Linux?
Problem
What do the following environment variables in Linux mean? What is $* (dollar sign followed by an asterisk)? What is $# (dollar sign next to a hash mark/number sign/octothorpe/pound sign)?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: What is $* and $# in Linux?
From here: So basically, is a number of arguments given when your script was executed. is a string containing all arguments. For example, is the first argument and so on. This is useful, if you want to access a specific argument in your script. As Brian commented, here is a simple example. If you run following command: = 3 = = array: = , = etc. These are part of POSIX standard, and should be supported by all compliant shells. For the reference, below is POSIX standard definitions for each speci…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix