xChar
undefined Avatar
@undefined
·19 days ago
undefined Avatar
@undefined
·2 months ago
undefined Avatar
@undefined
·2 months ago

对应的curl脚本在Bash中:

#!/bin/bash

echo "---- Fetch Image ----"
# Current time
t=$(date +"%Y_%m_%d_%H_%M_%S")
# Anime picture API
uri="https://t.alcy.cc/pc/"
# File name
filename="${t}.webp"
echo $filename
# Fetch the image using curl
curl -o $filename $uri
echo "---- Fetch Image ----"

这个脚本使用Bash获取当前时间,设置目标URL和文件名称,并使用curl命令下载文件。

• date +"%Y_%m_%d_%H_%M_%S" 获取当前时间并格式化为YYYY_MM_DD_HH_MM_SS样式。
• curl -o $filename $uri 下载文件并将其保存为$filename.

你可以将这个脚本保存为.sh文件,例如 fetch_image.sh,并通过以下方式运行:

bash fetch_image.sh

确保你有执行该脚本的权限。你可以通过以下命令赋予权限:

chmod +x fetch_image.sh

undefined Avatar
@undefined
·2 months ago
undefined Avatar
@undefined
·6 months ago
undefined Avatar
@undefined
·8 months ago
undefined Avatar
@undefined
·10 months ago
undefined Avatar
@undefined
·a year ago

@tualatrix arc

undefined Avatar
@undefined
·a year ago

@BrianRoemmele 青松岭?

undefined Avatar
@undefined
·a year ago

Requesting $CSB funds from the Faucet on the #Crossbell blockchain. Address: 0x33e3aFE15ac7E772cf75f2545b00565533c2cE07. https://faucet.crossbell.io/

undefined Avatar
@undefined
·a year ago

在我的区块链博客发布了一篇新文章《我是如何使用huginn的——同步youtube点赞到discord》,快来看看吧! https://lotosbin.xlog.app/wo-shi-ru-he-shi-yong-huginn-de--tong-bu-youtube-dian-zan-dao-discord 来自 @_xLog

undefined Avatar
@undefined
·a year ago
undefined Avatar
@undefined
·a year ago

@tualatrix 这是使用Language to Language的编译器来优化性能和实现多模型兼容么

undefined Avatar
@undefined
·a year ago

在我的区块链博客发布了一篇新文章《# Android Dev Tip #2023-05-04》,快来看看吧! https://lotosbin.xlog.app/-Android-Dev-Tip-2023-05-04 来自 @_xLog

undefined Avatar
@undefined
·a year ago
undefined Avatar
@undefined
·a year ago

在我的区块链博客发布了一篇新文章《Android Dev Tips 2023-04-25》,快来看看吧! https://lotosbin.xlog.app/Android-Dev-Tips-2023-04-25md 来自 @_xLog

undefined Avatar
@undefined
·a year ago
undefined Avatar
@undefined
·a year ago

Requesting $CSB funds from the Faucet on the #Crossbell blockchain. Address: 0xBcb7c41DE34187E8C0D99d583e5114Df45F46D68. https://faucet.crossbell.io/

undefined Avatar
@undefined
·a year ago

在我的区块链博客发布了一篇新文章《我常用的SSH命令》,快来看看吧! https://lotosbin.xlog.app/wo-chang-yong-de-SSH-ming-ling 来自 @_xLog

undefined Avatar
@undefined
·a year ago
undefined Avatar
@undefined
·a year ago
undefined Avatar
@undefined
·a year ago

以下是SCP -3命令的用法:

scp -3 user1@remote1:/path/to/file user2@remote2:/path/to/directory

这个命令将在远程主机1和远程主机2之间将文件直接传输,不需要将文件首先传输到本地计算机。需要注意的是,这需要在远程主机1和远程主机2之间建立SSH连接,并且必须拥有连接这些主机的权限。