Programming/Linux_Platform
android adb 에서 sh : shell script file 이 실행 안될때
decdream
2016. 10. 5. 19:54
실행법
# sh ./sigquit.system_server.sh &
or
# /system/bin/sh ./sigquit.system_server.sh &
아래와 같이 error 가 날때는
root@gracelte:/data/local/tmp # sh ./sigquit.system_server.sh &
[1] 13625
'oot@gracelte:/data/local/tmp # ./sigquit.system_server.sh[3]: sleep: syntax error: Invalid argument '10.0
./sigquit.system_server.sh[6]: syntax error: 'while' unmatched
[1] + Done (1) sh ./sigquit.system_server.sh
Ubuntu shell 에서..
sudo apt-get install dos2unix
dos2unix ./sigquit.system_server.sh
dos2unix: converting file ./sigquit.system_server.sh to Unix format ...
위와 같이 sh file 을 window format 에서 unix format 으로 변경.