|
发表于 2006-1-9 23:07:16
|
显示全部楼层
Post by nfs21cn
假如脚本在目录A, 脚本里的程序在目录B,而程序必须在B才能执行,而脚本也必须要求在A
请问如何解决该问题
for example:
#!/bin/sh
#somescript in the A directory
#someprogram in the B directory
someprogram parameter1 parameter2
then when I excute somescript, the A directory is set as the working directory,
whereas someprogram in B directory cann't be done
Please tell me how to resolve this problem
thanks a lot
脚本里cd到B然后执行就行。 |
|