# $# in Unix and In Ansible any way to find out The number of arguments supplied to a Ansible Playbook

**URL:** <https://forum.ansible.com/t/in-unix-and-in-ansible-any-way-to-find-out-the-number-of-arguments-supplied-to-a-ansible-playbook/26129>\
**Category:** Ansible Developer\
**Created:** [November 24, 2017, 5:48pm UTC](https://forum.ansible.com/t/in-unix-and-in-ansible-any-way-to-find-out-the-number-of-arguments-supplied-to-a-ansible-playbook/26129 "2017-11-24T17:48:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurabh](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Saurabh](https://forum.ansible.com/u/Saurabh)\
**Post date:** [November 24, 2017, 5:48pm UTC](https://forum.ansible.com/t/in-unix-and-in-ansible-any-way-to-find-out-the-number-of-arguments-supplied-to-a-ansible-playbook/26129/1 "2017-11-24T17:48:44Z")

</div>

$# --The number of arguments supplied to a script

Example :- ./test.sh 1 2 3 4 → $# = value will be 4

ansible-playbook main.yml -e “Var1=1 Var2= 2Var3=3 Var4=4”

How can we get a total number of arguments?
