Find the answer to your Linux question:
Results 1 to 4 of 4
hi, i have a new que. how can i count arguments of a script. i want to say user "you entered too arguments" ,if he/she enter the arguments more than ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    28

    about script

    hi,

    i have a new que.
    how can i count arguments of a script.

    i want to say user "you entered too arguments" ,if he/she enter the arguments more than script's arguments.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    28
    Thank you

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Posts
    30
    echo
    echo "Total number of arguments passed = $#"
    echo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...