문제

I'm trying to read the content from a aux file, but I can't figure why the command don't work, if I use the string in parameter, that was read from read from file..

Script

file=servers.aux
for server in $(cat $file)
do
echo $server
echo $server
`/usr/IBM/WebSphere/App/profiles/BPM/bin/serverStatus.sh $server -username adm -password adm`
done

Result

BPM.AppTarget.bpm01.0
ServersStatus[7]: ADMU0116I::  not found.

In past, I used something like: put the variable in one array and read the variable from that array, but I think this is possible, what I'm doing wrong?

Thanks in Advance Tiago

도움이 되었습니까?

해결책

I don't think you need the back-ticks on the last line. You're not trying to run the output of the serverStatus.sh script as a command itself, are you?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top