How to use arguments in a script?
Answer / Vinod Kumar Nimesh
Arguments can be passed to a shell script using command line arguments. To access the arguments within the script, you can use positional parameters such as $1, $2, etc. Here's an example:n```bashn#!/bin/bashnecho 'Argument 1: '$1necho 'Argument 2: '$2"
| Is This Answer Correct ? | 0 Yes | 0 No |
How will you list only the empty lines in a file (using grep)?
What is $1 in shell scripting?
write a non recursive shell script that accepts any number of arguments and prints them in the reverse order
How to write a function?
What is the difference between scripting and coding?
write a shell program to check wheather a given string is pallindrome or not?
What is subshell?
Calculate a real number calculation directly from the terminal and not any shell script.
Write a command sequence to find all the files modified in less than 2 days and print the record count of each.
why did you apply to shell
Why do we use shell scripting?
What is the significance of the shebang line in shell scripting?