what do u mean by $#,$* in unix programming?

Answers were Sorted based on User's Feedback



what do u mean by $#,$* in unix programming?..

Answer / vipul dalwala

$# - number of command line arguments or positional
parameters

$* - All of the positional parameters, seen as a single word

Is This Answer Correct ?    18 Yes 2 No

what do u mean by $#,$* in unix programming?..

Answer / narendrasairam

$# - Number of argument passed

$* - Array of arguments given (or) passed arguments as an array

Is This Answer Correct ?    9 Yes 0 No

what do u mean by $#,$* in unix programming?..

Answer / anita lohia

$# The number of command line argument
$* All the arguments on the command line

Is This Answer Correct ?    6 Yes 0 No

what do u mean by $#,$* in unix programming?..

Answer / siva prasad

$#- total no of positional parameters excluding the program
name
$*- all the arguments excluding the program name

Is This Answer Correct ?    3 Yes 0 No

what do u mean by $#,$* in unix programming?..

Answer / satyabrata

$# it contains the no of positional parameters
$* it contains all positional parameters as a single string

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Shell Script Interview Questions

Create a bash shell script that removes all files whose names end with a "~" from your home directory and subdirectories. Name this script "cleanup.sh"

6 Answers  


What are filters explain sort with all the options available?

1 Answers  


How can you find out how long the system has been running?

1 Answers  


How to get script name inside a script?

1 Answers  


Is SSO and SSL support BOXI?

2 Answers  


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

1 Answers   Tech Mahindra,


Why is a script important?

1 Answers  


State the advantages of shell scripting?

1 Answers  


What does $$ mean in shell script?

1 Answers  


What is the meaning of $1 in shell script?

1 Answers  


write a non recursive shell script that accepts any number of arguments and prints them in the reverse order

3 Answers  


What are the different kinds of loops available in shell script?

3 Answers  


Categories