#!/bin/bash
# Note :
# "$*" All the positional parameters (as a single word) *
# "$@" All the positional parameters (as separate strings)
echo "Parameters -> $@";
# Print out number of parameters
echo "Number of parameters: $#";
# Print out all the parameters as a single word (include separete)
echo "Number of parameters: $*";
# Print out all the parameters as a single word (include separete)
echo "Number of parameters: $*";
total=$(echo $#)
a=0
for i in $(seq 1 $total);do
echo "$a .
parametre ${@:$i:1}"
a=$(($a+1))
done
Hiç yorum yok:
Yorum Gönder