Print passed parameters(ARGVs) through command line

Output

-a
-b
-c


Input

Add following options to the script

 -a -b -c

Code examples

JavaScript

for (var i=2;i < process.argv.length;i++) {
    console.log(process.argv[i]);
}

PHP

<?php
for ($i=1; $i<count($argv); $i++) {
    print($argv[$i]."\n");
}

Perl

foreach my $argv (@ARGV) {
    print $argv."\n";
}

Python

import sys
for item in sys.argv[1:]:
    print(item)

Ruby

ARGV.each_with_index do |arg, i|
    puts "#{arg}"
end