what are command line arguments? what is the need of those?

Answer Posted / sumit rawat

Unix compiler reads the commands line by line and assign the arguments to it positionally. Arguments are passed from the command line into a shell program using the positional parameters $1 through to $9. Each parameter corresponds to the position of the argument on the command line.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2382


Write down the syntax for all the loops in shell scripting.

858


What is sh in shell script?

733


What is a shell script? Can you name some of its advantages?

718


What is the significance of the shebang line in shell scripting?

753


How do I run a powershell script?

773


How can I set the default rwx permission to all users on every file which is created in the current shell?

1168


Where are cowrie shells found?

753


How many fields are present in a crontab file and what does each field specify?

836


What is the difference between bash and shell?

828


Differentiate between ‘ and ” quotes.

789


What is k shell?

714


What is $1 in shell scripting?

789


How do I run a .sh file?

783


How can the contents of a file inside jar be read without extracting in a shell script?

835