我正在尝试将文件从远程主机 SCP 到本地主机。
远程主机上的文件为 KMST_DataFile_[MMDDYY]T[HHMM].kms
我想出了 2 个 SCP 命令,但我想知道是否有办法将这些命令组合起来,以仅匹配上面的文件名模式和扩展名 .kms 的 SCP 文件
scp -v user@remotehost:/location/KMST_DataFile_*
scp -v user@remotehost:/location/{*.kms}
我有以下代码:
forkJoin([
this.restangular.all(this.commonService.getHospitalURI()).getList(),
this.restangular.all(this.commonService.getAgeGroupURI()).getList()
]).subscribe(responses => {
const hospital_result = responses[0];
// Error because of the line below
const agegroup_result = Array.from(responses[1]);
console.log('hospital ' + JSON.stringify(hospital_result))
console.log('agegroup ' + JSON.stringify(agegroup_result))
for (const productID_hospital of hospital_result[0]['product']) {
for (const productID_agegroup of agegroup_result) {
// Do Something here
}
}
})
Run Code Online (Sandbox Code Playgroud)
我正在使用Angular 5,执行forkjoin来依次调用响应。这部分完全没问题。但是在尝试解析JSON时出现错误。
我收到此错误:
src/app/layout/insurance-list/insurance-list.component.ts(75,48): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Iterable<{}>'.
Property '[Symbol.iterator]' is missing in type '{}'.
Run Code Online (Sandbox Code Playgroud)
如果我改变
const agegroup_result = Array.from(responses[1]);
Run Code Online (Sandbox Code Playgroud)
至 …