gpt4 book ai didi

linux - 在 linux 中使用 cl1p.net 在线剪贴板的 shell 脚本 - 错误 (23) 写入正文失败

转载 作者:太空宇宙 更新时间:2023-11-04 10:13:14 26 4
gpt4 key购买 nike

<分区>

我正在寻找一个简单的解决方案,将 stdout(或文件内容)从 Linux 主机(带有 bash 的 raspi)发送到我的 PC。 RaspberryPI 具有网络/互联网连接,但出于安全原因,它不是在 raspi 上设置 SMB/FTP 服务器的选项。使用命令行一直发送到外部 FTP 服务器是很烦人的。

请讨论一般方法(用于 Web 表单上传的 shell 脚本、替代选项),并特别评论脚本方法

我同时尝试编写一个 shell 脚本...

#!/bin/bash
a='content='
b=`cat $2`
content=$a$b
curl -i -X POST https://cl1p.net/$1 -H "Content-Type: application/x-www-form-urlencoded" --data-binary "content=$content"

如您所见,脚本应该接受 2 个命令行参数:

$1 ... clipboard "unique name"
$2 ... file to be sent to the clipboard)

使用命令行调用脚本时

$ ./sh ./bclip.sh 20171207testXX ./test.log

我希望能够在这里下载内容: https://cl1p.net/20171207testXX

但是当启动脚本时它说 : not found.sh: 2:/boot/bclip.sh [...然后是 CURL 上传输出,以及] (23)写正文失败

我做错了什么?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com