BASH:修订间差异
来自康健生活
创建页面,内容为“__NOTOC__ == GNU [http://www.gnu.org/software/bash/ Bash] == Bash is the GNU Project's shell. Bash is the Bourne Again SHell. Bash is an sh-compatible shell that inc…” |
|||
| 第30行: | 第30行: | ||
| 示例 || 示例 || 示例 | | 示例 || 示例 || 示例 | ||
|} | |} | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| 第38行: | 第39行: | ||
| 示例 || 示例 || 示例 | | 示例 || 示例 || 示例 | ||
|} | |} | ||
== 脚本 == | |||
=== 批量下载 === | |||
下载文本。 | |||
{{hc|head=urls.txt|output=<syntaxhighlight lang="bash"> | |||
https://github.com/asciinema/asciinema-player/releases/download/v3.0.1/asciinema-player.css | |||
https://github.com/asciinema/asciinema-player/releases/download/v3.0.1/asciinema-player.min.js | |||
</syntaxhighlight>}} | |||
脚本内容。 | |||
<syntaxhighlight lang="javascript"> | |||
#!/bin/bash | |||
while read file_name file_url | |||
do | |||
wget -O ${file_name} -c ${file_url} | |||
done < urls.txt</syntaxhighlight> | |||
== 书籍 == | == 书籍 == | ||