0

I have a simple bash script:

#!/bin/bash
echo "$@"
echo $@
for i in "$@"; do
    echo $i
done

When I ran it with -e, the '-e' is gone.

[root@4e127766a19f /]# ./me.sh -G
-G
-G
-G
[root@4e127766a19f /]# ./me.sh -e




I've tried a few different switches like -f, -L, -l, -X, -x, etc. Only -e and -E did not echo themselves so far.

I've tested this on Debian and Centos, and guess that this might be expected. What is the reason? My Google search was not fruitful.

Stephen
  • 551
  • 4
  • 11

0 Answers0