Why does sh/bash set command line parameter values when trying to set environment variable?
- by Touko
A question on basics : While tuning environment variables for a program launched from a script, I ended up with somewhat strange behaviour with sh (which seems to be actually linked to bash) : variable setting seems to mess up with command-line parameters.
Could somebody explain why does this happen?
A simple script:
#! /bin/sh
# Messes with $1…