# how to print all argument passed

**URL:** <https://community.unix.com/t/how-to-print-all-argument-passed/216268>\
**Category:** Shell Programming and Scripting\
**Created:** [October 13, 2008, 5:19pm UTC](https://community.unix.com/t/how-to-print-all-argument-passed/216268 "2008-10-13T17:19:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RahulJoshi](https://community.unix.com/user_avatar/community.unix.com/rahuljoshi/32/1074_2.png) [@RahulJoshi](https://community.unix.com/u/RahulJoshi)\
**Post date:** [October 13, 2008, 5:19pm UTC](https://community.unix.com/t/how-to-print-all-argument-passed/216268/1 "2008-10-13T17:19:41Z")

</div>

like i have script with which i have passed arg list :eg:  
i/p:  
scriopt1 arg1 arg2 arg3 .... argn  
o/p:  
arg1 arg2 arg3 .... argn

---

<div class="post-metadata">

**Author:** ![Ikon](https://community.unix.com/user_avatar/community.unix.com/ikon/32/1015_2.png) [@Ikon](https://community.unix.com/u/Ikon)\
**Post date:** [October 13, 2008, 5:23pm UTC](https://community.unix.com/t/how-to-print-all-argument-passed/216268/2 "2008-10-13T17:23:58Z")

</div>

Some useful strings:  
$$ = The PID number of the process executing the shell.  
$? = Exit status variable.  
$0 = The name of the command you used to call a program.  
$1 = The first argument on the command line.  
$2 = The second argument on the command line.  
$n = The nth argument on the command line.  
$\* = All the arguments on the command line.  
$# The number of command line arguments.

---

<div class="post-metadata">

**Author:** ![RahulJoshi](https://community.unix.com/user_avatar/community.unix.com/rahuljoshi/32/1074_2.png) [@RahulJoshi](https://community.unix.com/u/RahulJoshi)\
**Post date:** [October 13, 2008, 5:38pm UTC](https://community.unix.com/t/how-to-print-all-argument-passed/216268/3 "2008-10-13T17:38:52Z")

</div>

thanks ikon, it work for me.
