Can any body tell how the below three options differs from each other in Ruby?
Part-I
- –verbose
- -v
- -w
Part-II
- –n
- –p
All are doing the same job which is verbose mode ON. But logically how are they differs from each other?
Thanks,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
-vis just a shorter way of writing--verbose, so they are the same thing.-wturns on warnings, see http://www.caliban.org/ruby/rubyguide.shtml#warnings for more info about those.Part 2:
-nand-pare not related to verbosity. They just loop your ruby script.Run the following from your terminal:
Now press the enter key a few times. You should see:
Now do the same for
-p:This just repeats what you typed before pressing enter.