#!/bin/bash -x clear if [[ $# -gt 0 ]]; then for i in $@; do echo "Podano parametr $i" done else echo "Brak parametrów" fi i=1 while [[ $i -lt $# ]]; do printf "Podano parametr ${!i}" ((++i)) done if [[ $# -eq 0 ]]; then echo "składni: nazwa [-v] plik " exit 1 fi if [[ $1 = "-v" ]]; then shift less -- "$@" else cat -- "$@" fi