0

Linuxスクリプトと2台の異なるSolarisマシンがあります。1台はISO-8859-1もう1台です。UTF-8

実行するとUTF-8正常に動作しますが、ISOではエラーが発生します。

どのように実行する必要がありますか。

私のscritをsolarisにコピーすると、isoがあり、そこで実行するとエラーなしで正常に動作します

私の実行コード:

using (var sftp = new Sftp())
{
  try
    {
      sftp.Connect(target.FullyQualifiedDomainName);
      sftp.Authenticate(target.UserName, crypto.TwoWayDecrypt(target.Password));
      sftp.Put(AssemblyDirectory + "\\Scripts\\solaris_perf_data.sh", "perf_data.sh", CopyMode.Copy);
    }
  finally
    {
      sftp.Close();
    }
}

ssh.Execute(chModCommand);

//error here 
result =   ssh.Execute(executeCommand).ToString();        

私が得るエラーは次のとおりです。

copying script file and executing script on host Solaris 10 region settings 
(france). Error Message: System.IO.IOException: ./perf_data.sh[5]: 
TotSize==+utilisés,: numéro incorrect at Dart.Ssh.Ssh.Execute(String command, 
Object state) at   Virtustream.CAS.DataCollector.Library.DataCollectors.SolarisDataCollector.GetDat‌​a(Boolean 
isInventory, String subject, String executeCommand)
4

1 に答える 1

0

スクリプトで特定の文字をエンコードしている (多くの場合、コメント:-D) か、マシンで同じ権限を持っていないかのいずれかです。

于 2012-11-23T13:42:29.710 に答える