What is the significance of $#?



What is the significance of $#?..

Answer / Sandeep Aswal

$# represents the number of positional parameters passed to a shell script. It is useful when you want to loop through arguments or check if the script received any input.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

What are the additional egrep symbols?

2 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 advantages of shell script?

1 Answers  


write a shell script to identify the given string is palindrome or not?

17 Answers   CTS, HP, IBM, InfoEst, Wipro,


What is awk script?

1 Answers  


Which is better perl or shell scripting?

1 Answers  


Is scripting and coding the same thing?

1 Answers  


When you login to a c shell, which script would be run first?

2 Answers  


What is meant by $1 in shell script?

1 Answers  


wats the she bang statment with syntax?

3 Answers  


There is a record with fields namely name,roll no.,salary,grade etc.Now,write a script to create a file with multiple records have same combination of fields but with unique roll numbers.The script should work for different names in the input file.

1 Answers   Wipro,


c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again

3 Answers  


Categories