Argumentum-listázás Bashben


SUBMITTED BY: Guest

DATE: Dec. 18, 2013, 8:32 p.m.

FORMAT: Bash

SIZE: 119 Bytes

HITS: 866

  1. #!/bin/bash
  2. argc=$#
  3. argv=("$@")
  4. for ((i=0; i<$argc; i++))
  5. do
  6. echo "$i. ${argv[$i]}"
  7. done

comments powered by Disqus