Linux Programmer | RHCE | RHCSA

Search This Blog

Tuesday, 31 July 2018

How to handle more than 10 parameters in shell

Use curly braces to set them off:
echo "${10}"
You can also iterate over the positional parameters like this:
for arg
or
for arg in "$@"
or
while (( $# > 0 ))    # or [ $# -gt 0 ]
do
    echo "$1"
    shift
done

No comments:

Post a Comment

Kubernetes Cluster Security - Starting 2026 the Right Way 🛡️

Sooooo finally writing the first blog of 2026 — and what better topic to kick things off than Kubernetes cluster security . Kubernetes has...