How to display all the command line argument

Linux Bash Script

echo $0 
#It will print the first argument 
for i in `echo $@` 
#echo $@ contains all the argument except first argument
do
        echo $i
done

                                                                                                                                                                                                           

 

Execute the Linux Script

./1_print_all_arguments_command_line.sh command line arguments

 

Output of Linux Script

./1_print_all_arguments_command_line.sh
command
line
arguments