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

$* - 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
$*- 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

What is use of "cut" command?

3 Answers  

how to delete all the files with extension .dat rom a directory tree from root to third level in a single unix command?

4 Answers  

In a single command how do you run the previous command in the command prompt.

5 Answers  

In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.

9 Answers   Amazon,

I Forgot My Windows Vista Password! How Can I Find My Windows Lost Password?

1 Answers  

how to find weblogic version through linux cammand

1 Answers   L&T,

write a scwipt that a) takes exactly one argument, a directory name. b) if the number of argument is more or less than one,print a usage message c) if the argument is not adirectory, print another message d) for the given directory, print the five biggest files and the five files that were most recently modified. e) save the output to a file called q2output.

2 Answers  

Please anyone suggest atleast 2 good training institutes in Hyderabad, INDIA where i can learn unix shell scripting.

1 Answers  

write a shell script that accepts name from user and creates a directory by the path name, then creates a text file in that directory and stores in it, the data accepted from user till STOP, displays the no. of characters stored in the file.Program stops if directory name is null

1 Answers  

What are the 4 basics of OOP?

1 Answers   Infosys, Amazon,

what is tickets $ what low,medium,high priorite pls define time also

0 Answers  

What is the basic difference you find between a shell script and perl?

3 Answers   Yahoo,