/var/mod/root # /var/media/ftp/uStor01/stv/sfcron-wrap
-sh: /var/media/ftp/uStor01/stv/sfcron-wrap: not found
/var/mod/root # /var/media/ftp/uStor01/stv/sfcron-wrap
-sh: /var/media/ftp/uStor01/stv/sfcron-wrap: not found
/var/mod/root # cd /var/media/ftp/uStor01/
/var/media/ftp/uStor01 # cd stv/
/var/media/ftp/uStor01/stv # ls
_Done data sfcron-wra sfcron-wrap sfcron-wrap~ sfcron-wra~ sfdl sfdl~ temp wget-log
/var/media/ftp/uStor01/stv # ./sfdl
-sh: ./sfdl: not found
/var/media/ftp/uStor01/stv #
./sfdl
./sfdl: line 298: syntax error near unexpected token `('
./sfdl: line 298: ` for (( ARGI=1;ARGI<$#;ARGI++)); do'
bash ./sfdl
./sfdl
/var/media/ftp/uStor01/stv # bash ./sfdl
./sfdl: line 298: syntax error near unexpected token `('
./sfdl: line 298: ` for (( ARGI=1;ARGI<$#;ARGI++)); do'
/var/media/ftp/uStor01/stv # ./sfdl
./sfdl: line 298: syntax error near unexpected token `('
./sfdl: line 298: ` for (( ARGI=1;ARGI<$#;ARGI++)); do'
root@fritz:/var/mod/root# ./b_test
./b_test: line 5: syntax error: unexpected "(" (expecting "fi")
root@fritz:/var/mod/root# bash ./b_test
root@fritz:/var/mod/root# cat b_test
#!/bin/sh
if [ "$1" == "info" ] && [ "${2}x" != "" ]; then
ARGI=0
ARGA=("$@")
echo ${ARGA[@]}
for (( ARGI=1;ARGI<$#;ARGI++)); do
echo ARGA: ${ARGA[$ARGI]}
showinfo ${ARGA[$ARGI]}
done
exit
fi
root@fritz:/var/mod/root#
.. das liegt wohl am "shebang"?ich erkenne 0,0 unterschied
/var/media/ftp/uStor01 # ./test
./test: line 5: syntax error: "(" unexpected (expecting "fi")
/var/media/ftp/uStor01 # bash ./test
./test: line 5: syntax error near unexpected token `('
./test: line 5: ` ARGA=("$@")'
/var/media/ftp/uStor01 #
if [ "$1" == "info" ] && [ "${2}x" != "x" ]; then
ARGI=0
for arg in "$@"; do
if [ $ARGI -ne 0 ]; then
echo ARGA: $arg
showinfo $arg
else
ARGI=1
fi
done
exit
fi
/var/media/ftp/uStor01 # ./test: line 5: syntax error: "(" unexpected (expecting "fi")
-sh: syntax error: "(" unexpected
/var/media/ftp/uStor01 # ./test1
bash 3.2.48 (binary only) [ ] minimal config [ ] enable command line editing and history