weixin_46956544 2020-11-05 17:28
浏览 31

mac iterm2设置lrzsz实现上传下载功能失败

机器型号:

iterm2配置信息:

sh配置文件:

/usr/local/bin/iterm2-recv-zmodem.sh

#!/bin/bash
# 这个脚本来自 github,删掉了一些 ** 言论。

osascript -e 'tell application "iTerm2" to version' > /dev/null 2>&1 && NAME=iTerm2 || NAME=iTerm
if [[ $NAME = "iTerm" ]]; then
        FILE=$(osascript -e 'tell application "iTerm" to activate' -e 'tell application "iTerm" to set thefile to choose folder with prompt "Choose a folder to place received files in"' -e "do shell script (\"echo \"&(quoted form of POSIX path of thefile as Unicode text)&\"\")")
else
        FILE=$(osascript -e 'tell application "iTerm2" to activate' -e 'tell application "iTerm2" to set thefile to choose folder with prompt "Choose a folder to place received files in"' -e "do shell script (\"echo \"&(quoted form of POSIX path of thefile as Unicode text)&\"\")")
fi

if [[ $FILE = "" ]]; then
        echo Cancelled.
        # Send ZModem cancel
        echo -e \\x18\\x18\\x18\\x18\\x18
        sleep 1
        echo
        echo \# Cancelled transfer
else
        cd "$FILE"
        /usr/local/bin/rz -E -e -b --bufsize 4096
        sleep 1
        echo
        echo
        echo \# Sent \-\> $FILE
fi

 /usr/local/bin/iterm2-send-zmodem.sh

  • 写回答

0条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥20 关于#深度学习#的问题:典型地物的识别问题
      • ¥20 怎么用两个51单片机各控制8个led灯
      • ¥15 克里金插值法的半方差矩阵不可逆怎么解啊
      • ¥15 求C++ I/O程序的编写示例
      • ¥15 openresty根据post请求体转发
      • ¥15 quartusⅡ18.1 这张图片的引脚绑定,实验箱如何操作,拍照回答,希望自己能够多学习点东西,让我进步,在以后会更好的使用这款软件,设计更多的程序
      • ¥15 Rstudio Cloud 无法读取本地文件怎么处理
      • ¥15 想要吧栈里面存储的数据写入到文件中
      • ¥15 fpga逻辑与代码不符合的问题
      • ¥15 Android studio安装后运行项目报错