emptygif
语言: 简体中文

所有语言和框架

printf (Bash, zsh) Shell

一个用于 printf (Bash, zsh) 的 Shell 代码片段,以空 GIF 响应对 /pixel.gif 的请求,GIF 在启动时只解码一次。

printf (Bash, zsh) Shell

文件
pixel.sh
# %b expands the \xHH escapes (bash and zsh builtins; POSIX sh lacks \x - use base64 -d).
printf '%b' '\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\xff\xff\xff\x00\x00\x00\x21\xf9\x04\x01\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3b' > pixel.gif

我们运行了此代码片段,并比对了它返回的字节。

官方网站: printf (Bash, zsh)

更多 Shell 示例