Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • Thank you so much daisy for answering so quickly, Do you know tho about having too little arguments? Commented Mar 7, 2017 at 11:09
  • too little or none :) if you can let me know i'll appreciate it! Commented Mar 7, 2017 at 11:16
  • @Bob you can check arguments using if (($# < 2 )); then usage; fi. Commented Mar 7, 2017 at 11:16
  • Thanks and if there was an extra argument after the list? I tried if (($# > 3 )); then usage; fi but it didn't work Commented Mar 7, 2017 at 12:19
  • extra argument (not beeing -a/-b will be caught by *) in case. Commented Mar 7, 2017 at 13:01