Solaris에서 간단한 csh 스크립트를 실행할 때 이상한 문제가 있음을 발견했습니다.csh 스크립트가 envirionment 변수를 상속합니까?
#!/bin/csh
echo $LD_LIBRARY_PATH
이 스크립트를 test
이라고합시다. 내가 이것을 실행할 때 :
shell> echo $LD_LIBRARY_PATH
shell> /usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/lib:/my_app/lib
shell> ./test
shell> /usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/lib
그들은 $ LD_LIBRARY_PATH에 대해 완전히 다른 값을 출력합니다. 나는 이유를 알 수 없다. (내 리눅스 머신에서는 괜찮아.)
고마워!
그 결과를 ... – ghostdog74
그건 그렇고, 그'#!/bin/csh' – ghostdog74
결과는 – solotim