简体   繁体   English

Unix Shell脚本问题

[英]Unix Shell Script Issue

Referring to following Unix Shell Script, when I type in the correct command to run the <(./TCPHost.out $2), I am receiving the following error: 参考以下Unix Shell脚本,当我键入正确的命令以运行<(./ TCPHost.out $ 2)时,我收到以下错误:

open[1905:26153] Metadata.framework [Error]: void _MDItemMarkAsUsedForPath(CFStringRef): was called with a NULL path

This is the only one I'm receiving this error on. 这是我唯一收到此错误的人。 Can someone explain to me why this is happened? 有人可以向我解释为什么会这样吗? The weird thing is that it's technically working, but it doesn't open another shell like the others do. 奇怪的是,它在技术上是可以正常工作的,但是它没有打开其他外壳,就像其他外壳一样。

#!/bin/bash

if [ "$1" = "Server" ]
then
    echo *********** SERVER IS RUNNING ***********
    open -a Terminal ./TCPServer.out
fi

if [ "$1" = "Host" ]
then
    echo HOST IS RUNNING
    open -a Terminal <(./TCPHost.out $2)
fi

if [ "$1" = "Client" ]
then
    open -a Terminal ./TCPClient.out
fi

尝试

open -a Terminal "./TCPHost.out $2"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM