uwe@camp:/tmp$cat test
echo $SHLVL
uwe@camp:/tmp$./test
2
uwe@camp:/tmp$echo -e '#!/bin/sh\n'$(<test) >test2
uwe@camp:/tmp$chmod +x test2
uwe@camp:/tmp$./test2
1
---
hier meins
Dirks-MacBook-Pro:development dmader 1022 $ ./test
2
Dirks-MacBook-Pro:development dmader 1023 $ ./test2
2
Dirks-MacBook-Pro:development dmader 1024 $ cat test{,2}
echo $SHLVL
#!/bin/sh
echo $SHLVL
Add a code snippet to your website: www.paste.org