当前位置: 首页 > news >正文

Linux Bash 中使用重定向运算符的 5 种方法

注:机翻,未校。


Five ways to use redirect operators in Bash

Posted: January 22, 2021 | by Damon Garn

Redirect operators are a basic but essential part of working at the Bash command line. See how to safely redirect input and output to make your Linux sysadmin life easier.

重定向操作符是在 Bash 命令行中工作的一个基本但重要的部分。了解如何安全地重定向输入和输出,从而简化 Linux 系统管理员的工作。

Detour sign

Photo by Kind and Curious on Unsplash

Data is entered into the computer via stdin (usually the keyboard), and the resulting output goes to stdout (usually the shell). These pathways are called streams. However, it’s possible to alter these input and output locations, causing the computer to get information from somewhere other than stdin or send the results somewhere other than stdout. This functionality is referred to as redirection.
数据通过 stdin(通常是键盘)输入到计算机中,生成的输出进入 stdout(通常是 shell)。这些路径称为流。但是,可能会更改这些输入和输出位置,从而导致计算机从 stdin 以外的位置获取信息,或者将结果发送到 stdout 以外的位置。此功能称为重定向。

In this article, you’ll learn five redirect operators, including one for stderr. I’ve provided examples of each and presented the material in a way that you can duplicate on your own Linux system.
在本文中,您将学习 5 个重定向运算符,包括一个用于 stderr 的运算符。我提供了每个示例,并以您可以在自己的 Linux 系统上复制的方式呈现这些材料。

Regular output > operator 常规输出>运算符

The output redirector is probably the most recognized of the operators. The standard output (stdout) is usually to the terminal window. For example, when you type the date command, the resulting time and date output is displayed on the screen.
输出重定向器可能是运算符中最受认可的。标准输出 (stdout) 通常发送到终端窗口。例如,当您键入 date 命令时,生成的时间和日期输出将显示在屏幕上。

[damon@localhost ~]$ date
Tue Dec 29 04:07:37 PM MST 2020
[damon@localhost ~]$

It is possible, however, to redirect this output from stdout to somewhere else. In this case, I’m going to redirect the results to a file named specifications.txt. I’ll confirm it worked by using the cat command to view the file contents.
但是,可以将此输出从 stdout 重定向到其他位置。在本例中,我要将结果重定向到名为 specifications.txt 的文件。我将通过使用 cat 命令查看文件内容来确认它是否正常工作。

[damon@localhost ~]$ date > specifications.txt
[damon@localhost ~]$ cat specifications.txt 
Tue Dec 29 04:08:44 PM MST 2020
[damon@localhost ~]$ 

The problem with the > redirector is that it overwrites any existing data in the file. At this stage, you now have date information in the specifications.txt file, right? If you type hostname > specifications.txt, the output will be sent to the text file, but it will overwrite the existing time and date information from the earlier steps.
> 重定向器的问题在于它会覆盖文件中的所有现有数据。在此阶段,您现在在 specifications.txt 文件中有 date 信息,对吧?如果键入 hostname > specifications.txt,输出将发送到文本文件,但会覆盖先前步骤中的现有时间和日期信息。

[damon@localhost ~]$ hostname > specifications.txt 
[damon@localhost ~]$ cat specifications.txt 
localhost.localdomain
[damon@localhost ~]$ 

It is easy to get in trouble with the > redirector by accidentally overwriting existing information.
由于意外覆盖现有信息,很容易在使用 > 重定向器时遇到麻烦。

Regular output append >> operator 常规输出追加>>运算符

The append >> operator adds the output to the existing content instead of overwriting it. This allows you to redirect the output from multiple commands to a single file. For example, I could redirect the output of date by using the > operator and then redirect hostname and uname -r to the specifications.txt file by using >> operator.
追加 >> 运算符将输出添加到现有内容中,而不是覆盖它。这使您可以将多个命令的输出重定向到单个文件。例如,我可以使用 > 运算符重定向 date 的输出,然后使用 >> 运算符将 hostnameuname -r 重定向到 specifications.txt 文件。

[damon@localhost ~]$ date > specifications.txt
[damon@localhost ~]$ hostname >> specifications.txt 
[damon@localhost ~]$ uname -r >> specifications.txt 
[damon@localhost ~]$ cat specifications.txt 
Tue Dec 29 04:11:51 PM MST 2020
localhost.localdomain
5.9.16-200.fc33.x86_64
[damon@localhost ~]$ 

Note: The >> redirector even works on an empty file. That means that you could conceivably
注意:>> 重定向器甚至可以处理空文件。

ignore the regular > redirector to alleviate the potential to overwrite data, and always rely on the >> redirector instead. It’s not a bad habit to get into.
忽略常规 > 重定向器以减轻覆盖数据的可能性,并始终依赖 >> 重定向器。养成这不是一个坏习惯。

Regular input < operator 常规输入<运算符

The input redirector pulls data in a stream from a given source. Usually, programs receive their input from the keyboard. However, data can be pulled in from another source, such as a file.
输入重定向器从给定源拉取流中的数据。通常,程序从键盘接收输入。但是,可以从其他源(例如文件)拉取数据。

It’s time to build an example by using the sort command. First, create a text file named mylist.txt that contains the following lines:
现在是使用 sort 命令构建示例的时候了。首先,创建一个名为 mylist.txt 的文本文件,其中包含以下行:

cat
dog
horse
cow

Observe that the animals are not listed in alphabetical order.
请注意,这些动物不是按字母顺序列出的。

What if you need to list them in order? You can pull the contents of the file into the sort command by using the < operator.
如果您需要按顺序列出它们怎么办?您可以使用 < 运算符将文件的内容拉入 sort 命令。

[damon@localhost ~]$ sort < mylist.txt 
cat
cow
dog
horse
[damon@localhost ~]$ 

You could even get a little fancier and redirect the sorted results to a new file:
您甚至可以更花哨一点,并将排序结果重定向到新文件:

[damon@localhost ~]$ sort < mylist.txt > alphabetical-file.txt
[damon@localhost ~]$ cat alphabetical-file.txt 
cat
cow
dog
horse
[damon@localhost ~]$ 

Regular error 2> operator 常规错误 2> 运算符

The stdout displays expected results. If errors appear, they are managed differently. Errors are labeled as file descriptor 2 (standard output is file descriptor 1). When a program or script does not generate the expected results, it throws an error. The error is usually sent to the stdout, but it can be redirected elsewhere. The stderr operator is 2> (for file descriptor 2).
stdout 显示预期结果。如果出现错误,将以不同的方式进行管理。错误被标记为文件描述符 2(标准输出为文件描述符 1)。当程序或脚本未生成预期结果时,它会引发错误。错误通常会发送到 stdout,但可以将其重定向到其他地方。stderr 运算符为 2>(用于文件描述符 2)。

Here is a simple example, using the misspelled ping command:
下面是一个简单的示例,使用拼写错误的 ping 命令:

[damon@localhost ~]$ png
bash: png: command not found...
[damon@localhost ~]$

Here is the same misspelled command with the error output redirected to /dev/null:
这是相同的拼写错误命令,错误输出重定向到 /dev/null

[damon@localhost ~]$ png 2> /dev/null
[damon@localhost ~]$ 

Skip to the bottom of list
Automation advice 自动化建议
Ansible Automation Platform beginner’s guide Ansible 自动化平台初学者指南
A system administrator’s guide to IT automation IT 自动化系统管理员指南
Ansible Automation Platform trial subscription Ansible 自动化平台试用订阅
Automate Red Hat Enterprise Linux with Ansible and Satellite 使用 Ansible 和 Satellite 实现红帽企业 Linux 的自动化

The resulting error message is redirected to /dev/null instead of the stdout, so no result or error message is displayed on the screen.
生成的错误消息将重定向到 /dev/null 而不是 stdout,因此屏幕上不会显示任何结果或错误消息。

Note: /dev/null, or the bit bucket, is used as a garbage can for the command line. Unwanted output can be redirected to this location to simply make it disappear. For example, perhaps you’re writing a script, and you want to test some of its functionality, but you know it will throw errors that you don’t care about at this stage of development. You can run the script and tell it to redirect errors to /dev/null for convenience.
注意:/dev/null,即位桶,用作命令行的垃圾桶。不需要的输出可以重定向到此位置,以使其消失。例如,也许您正在编写一个脚本,并且想要测试其中的一些功能,但您知道它会抛出您在此开发阶段不关心的错误。为方便起见,您可以运行脚本并告诉它将错误重定向到 /dev/null

Pipe | operator 管道 | 运算符

Ken Hess already has a solid article on using the pipe | operator, so I’m only going to show a very quick demonstration here.
Ken Hess 已经有一篇关于使用 pipe | 运算符的扎实文章,所以我在这里只打算展示一个非常快速的演示。

The pipe takes the output of the first command and makes it the input of the second command. You might want to see a list of all directories and files in the /etc directory. You know that’s going to be a long list and that most of the output will scroll off the top of the screen. The less command will break the output into pages, and you can then scroll upward or downward through the pages to display the results. The syntax is to issue the ls command to list the contents of /etc, and then use pipe to send that list into less so that it can be broken into pages.
管道接收第一个命令的输出,并使其成为第二个命令的输入。您可能希望查看 /etc 目录中所有目录和文件的列表。你知道这将是一个很长的列表,大部分输出将从屏幕顶部滚动。less 命令会将输出分解为多个页面,然后您可以向上或向下滚动页面以显示结果。语法是发出 ls 命令列出 /etc 的内容,然后使用管道将该列表发送到 less 中,以便可以将其分解为多个页面。

[damon@localhost ~]$ ls /etc | less

Ken’s article has many more great examples. Personally, I find myself using *command* | less and *command* | grep *string* the most often.
Ken 的文章还有很多很好的例子。就我个人而言,我发现自己最常使用 *command* | less*command* | grep *string*

Download now: A sysadmin’s guide to Bash scripting.

Wrap up 总结

Redirect operators are very handy, and I hope this brief summary has provided you with some tricks for manipulating input and output. The key is to remember that the > operator will overwrite existing data.
重定向运算符非常方便,我希望这个简短的摘要为您提供了一些操作输入和输出的技巧。关键是要记住 > 运算符将覆盖现有数据。


Bash Redirections Cheat Sheet

RedirectionDescription
cmd > fileRedirect the standard output (stdout) of cmd to a file.
cmd 1> fileSame as cmd > file. 1 is the default file descriptor (fd) for stdout.
cmd 2> fileRedirect the standard error (stderr) of cmd to a file. 2 is the default fd for stderr.
cmd >> fileAppend stdout of cmd to a file.
cmd 2>> fileAppend stderr of cmd to a file.
cmd &> fileRedirect stdout and stderr of cmd to a file.
cmd > file 2>&1Another way to redirect both stdout and stderr of cmd to a file. This is not the same as cmd 2>&1 > file. Redirection order matters!
cmd > /dev/nullDiscard stdout of cmd.
cmd 2> /dev/nullDiscard stderr of cmd.
cmd &> /dev/nullDiscard stdout and stderr of cmd.
cmd < fileRedirect the contents of the file to the standard input (stdin) of cmd.
cmd << EOL
line1
line2
EOL
Redirect a bunch of lines to the stdin. If ‘EOL’ is quoted, text is treated literally. This is called a here-document.
cmd <<-EOL
<tab>foo
<tab><tab>bar
EOL
Redirect a bunch of lines to the stdin and strip the leading tabs.
cmd <<< “string”Redirect a single line of text to the stdin of cmd. This is called a here-string.
exec 2> fileRedirect stderr of all commands to a file forever.
exec 3< fileOpen a file for reading using a custom file descriptor.
exec 3> fileOpen a file for writing using a custom file descriptor.
exec 3< > fileOpen a file for reading and writing using a custom file descriptor.
exec 3>&-Close a file descriptor.
exec 4>&3Make file descriptor 4 to be a copy of file descriptor 3. (Copy fd 3 to 4.)
exec 4>&3-Copy file descriptor 3 to 4 and close file descriptor 3.
echo “foo” >&3Write to a custom file descriptor.
cat <&3Read from a custom file descriptor.
(cmd1; cmd2) > fileRedirect stdout from multiple commands to a file (using a sub-shell).
{ cmd1; cmd2; } > fileRedirect stdout from multiple commands to a file (faster; not using a sub-shell).
exec 3< > /dev/tcp/host/portOpen a TCP connection to host:port. (This is a bash feature, not Linux feature).
exec 3< > /dev/udp/host/portOpen a UDP connection to host:port. (This is a bash feature, not Linux feature).
cmd <(cmd1)Redirect stdout of cmd1 to an anonymous fifo, then pass the fifo to cmd as an argument. Useful when cmd doesn’t read from stdin directly.
cmd < <(cmd1)Redirect stdout of cmd1 to an anonymous fifo, then redirect the fifo to stdin of cmd. Best example: diff <(find /path1 | sort) <(find /path2 | sort).
cmd <(cmd1) <(cmd2)Redirect stdout of cmd1 and cmd2 to two anonymous fifos, then pass both fifos as arguments to cmd.
cmd1 >(cmd2)Run cmd2 with its stdin connected to an anonymous fifo, and pass the filename of the pipe as an argument to cmd1.
cmd1 > >(cmd2)Run cmd2 with its stdin connected to an anonymous fifo, then redirect stdout of cmd to this anonymous pipe.
cmd1 | cmd2Redirect stdout of cmd1 to stdin of cmd2. Pro-tip: This is the same as cmd1 > >(cmd2), same as cmd2 < <(cmd1), same as > >(cmd2) cmd1, same as < <(cmd1) cmd2.
cmd1 |& cmd2Redirect stdout and stderr of cmd1 to stdin of cmd2 (bash 4.0+ only). Use cmd1 2>&1 | cmd2 for older bashes.
cmd | tee fileRedirect stdout of cmd to a file and print it to screen.
exec {filew}> fileOpen a file for writing using a named file descriptor called {filew} (bash 4.1+).
cmd 3>&1 1>&2 2>&3Swap stdout and stderr of cmd.
cmd > >(cmd1) 2> >(cmd2)Send stdout of cmd to cmd1 and stderr of cmd to cmd2.
cmd1 | cmd2 | cmd3 | cmd4 echo ${PIPESTATUS[@]}Find out the exit codes of all piped commands.

via:

  • Five ways to use redirect operators in Bash | Enable Sysadmin Posted: January 22, 2021 | by Damon Garn
    https://www.redhat.com/sysadmin/redirect-operators-bash

相关文章:

Linux Bash 中使用重定向运算符的 5 种方法

注&#xff1a;机翻&#xff0c;未校。 Five ways to use redirect operators in Bash Posted: January 22, 2021 | by Damon Garn Redirect operators are a basic but essential part of working at the Bash command line. See how to safely redirect input and output t…...

硬件作品3----STM32F103RCT6最小系统板MCU配置

参考文章&#xff1a;对stm32F103RCT6原理图解析&#xff08;详细&#xff09;-CSDN博客 本想绘制稍微复杂一些的电路&#xff0c;但是出现很多问题&#xff0c;因此先绘制一块最小系统板进行原理、绘制方法的验证。 设计难度&#xff1a;★ 适合人群&#xff1a;初学者 一、…...

人脸识别打卡系统--基于QT(附源码)

逃离舒适区 项目源代码放在我的仓库中&#xff0c;有需要自取 项目地址 https://gitcode.com/hujiahangdewa/Face_recognition.git 文章目录 一、项目结构分析二、服务器的搭建三、客户端的搭建四、人脸识别库的申请五、基于人脸识别库的识别判断六、QT人脸识别----调用百度ai…...

【深度学习入门】深度学习知识点总结

一、卷积 &#xff08;1&#xff09;什么是卷积 定义&#xff1a;特征图的局部与卷积核做内积的操作。 作用&#xff1a;① 广泛应用于图像处理领域。卷积操作可以提取图片中的特征&#xff0c;低层的卷积层提取局部特征&#xff0c;如&#xff1a;边缘、线条、角。 ② 高层…...

通过视觉语言模型蒸馏进行 3D 形状零件分割

大家读完觉得有帮助记得关注和点赞&#xff01;&#xff01;&#xff01;对应英文要求比较高&#xff0c;特此说明&#xff01; Abstract This paper proposes a cross-modal distillation framework, PartDistill, which transfers 2D knowledge from vision-language models …...

机器学习10-解读CNN代码Pytorch版

机器学习10-解读CNN代码Pytorch版 我个人是Java程序员&#xff0c;关于Python代码的使用过程中的相关代码事项&#xff0c;在此进行记录 文章目录 机器学习10-解读CNN代码Pytorch版1-核心逻辑脉络2-参考网址3-解读CNN代码Pytorch版本1-MNIST数据集读取2-CNN网络的定义1-无注释版…...

微服务学习-Gateway 统一微服务入口

1. 微服务为什么需要 API 网关&#xff1f; 1.1. 在微服务架构中&#xff0c;通常一个系统会被拆分为多个微服务&#xff0c;面对多个微服务客户端应该如何去调用呢&#xff1f; 如果根据每个微服务的地址发起调用&#xff0c;存在如下问题&#xff1a; 客户端多次请求不同的…...

2025寒假备战蓝桥杯02---朴素二分查找升级版本的学习+分别求解左右端点

文章目录 1.朴素二分查找的升级版2.查找左端点3.查找右端点4.代码的编写 1.朴素二分查找的升级版 和之前介绍的这个二分查找相比&#xff0c;我觉得这个区别就是我们的这个二分查找需要找到的是一个区间&#xff0c;而不是这个区间里面的某一个元素的位置&#xff1b; 2.查找…...

PHP语言的软件工程

PHP语言的软件工程 引言 软件工程是计算机科学中的一个重要分支&#xff0c;它涉及软件的规划、开发、测试和维护。在现代开发中&#xff0c;PHP作为一种流行的服务器端脚本语言&#xff0c;广泛应用于网页开发和各种企业应用中。本文将深入探讨PHP语言在软件工程中的应用&am…...

linux-FTP服务配置与应用

也许你对FTP不陌生&#xff0c;但是你是否了解FTP到底是个什么玩意&#xff1f; FTP 是File Transfer Protocol&#xff08;文件传输协议&#xff09;的英文简称&#xff0c;而中文简称为 “文传协议” 用于Internet上的控制文件的双向传输。同时&#xff0c;它也是一个应用程序…...

靠右行驶数学建模分析(2014MCM美赛A题)

笔记 题目 要求分析&#xff1a; 比较规则的性能&#xff0c;分为light和heavy两种情况&#xff0c;性能指的是 a.流量与安全 b. 速度限制等分析左侧驾驶分析智能系统 论文 参考论文 两类规则分析 靠右行驶&#xff08;第一条&#xff09;2. 无限制&#xff08;去掉了第一条…...

(1)STM32 USB设备开发-基础知识

开篇感谢&#xff1a; 【经验分享】STM32 USB相关知识扫盲 - STM32团队 ST意法半导体中文论坛 单片机学习记录_桃成蹊2.0的博客-CSDN博客 USB_不吃鱼的猫丿的博客-CSDN博客 1、USB鼠标_哔哩哔哩_bilibili usb_冰糖葫的博客-CSDN博客 USB_lqonlylove的博客-CSDN博客 USB …...

Spring中如何动态的创建、监听MQ以及创建Exchange

文章目录 前言动态创建和管理Exchange、Queue动态消费Queue结论 前言 前面我们学习 RabbitMQ 的时候&#xff0c;都是在编译的时候就确定了Exchange、Queue&#xff0c;也就是说我们需要在程序启动之前就创建好需要的Exchange和Queue&#xff0c;但是实际使用的时候&#xff0…...

中国综合算力指数(2024年)报告汇总PDF洞察(附原数据表)

原文链接&#xff1a; https://tecdat.cn/?p39061 在全球算力因数字化技术发展而竞争加剧&#xff0c;我国积极推进算力发展并将综合算力作为数字经济核心驱动力的背景下&#xff0c;该报告对我国综合算力进行研究。 中国算力大会发布的《中国综合算力指数&#xff08;2024年…...

【Python项目】小区监控图像拼接系统

【Python项目】小区监控图像拼接系统 技术简介&#xff1a;采用Python技术、B/S框架、MYSQL数据库等实现。 系统简介&#xff1a;小区监控拼接系统&#xff0c;就是为了能够让业主或者安保人员能够在同一时间将不同地方的图像进行拼接。这样一来&#xff0c;可以很大程度的方便…...

常用排序算法之插入排序

目录 前言 一、基本原理 1.算法步骤 2.动画演示 3.插入排序的实现代码 二、插入排序的时间复杂度 1. 时间复杂度 1.最优时间复杂度 2.最差时间复杂度 3.平均时间复杂度 2. 空间复杂度 三、插入排序的优缺点 1.优点 2.缺点 四、插入排序的改进与变种 五、插入排…...

Elasticsearch(ES)基础查询语法的使用

1. Match Query (全文检索查询) 用于执行全文检索&#xff0c;适合搜索文本字段。 { “query”: { “match”: { “field”: “value” } } } match_phrase&#xff1a;精确匹配短语&#xff0c;适合用于短语搜索。 { “query”: { “match_phrase”: { “field”: “text” }…...

一篇文章学会Milvus【Docker 中运行 Milvus(Windows),Python实现对Milvus的操作,源代码案例,已经解决巨坑】【程序员猫爪】

一篇文章学会Milvus【Docker 中运行 Milvus&#xff08;Windows&#xff09;&#xff0c;Python实现对Milvus的操作&#xff0c;源代码案例&#xff0c;已经解决巨坑】【程序员猫爪】 一、Milvus 是什么&#xff1f;【程序员猫爪】1、Milvus 是一种高性能、高扩展性的向量数据库…...

前端之移动端

视口 布局视口 layout viewport 视口&#xff08;viewport&#xff09;就是浏览器显示页面内容的屏幕区域。 视口可以分为布局视口、视觉视口和理想视口 一般移动设备的浏览器都默认设置了一个布局视口&#xff0c;用于解决早期的PC端页面在手机上显示的问题。 iOS, Androi…...

记一次 SpringBoot 启动慢的问题

记一次 SpringBoot 启动慢的问题 背景问题描述分析处理Flame Graph 火焰图Call Tree 调用树关键词检索尝试解决 为什么这样反向检索问题梳理 复盘处理流程为什么 Reference 背景 最近临时接了一个任务&#xff0c;就从一个旧 springboot 项目 copy 出来&#xff0c;临时写个服…...

除了排错,你可能不知道OPC Expert v8.1还能做这些:数据归档、计算与冗余实战

解锁OPC Expert v8.1的隐藏潜力&#xff1a;数据归档、实时计算与冗余架构实战指南在工业自动化领域&#xff0c;OPC Expert常被视为故障排查的"急救箱"&#xff0c;但它的能力远不止于此。当大多数工程师还在用它解决DCOM配置问题时&#xff0c;少数先行者已经用它重…...

别再只测accuracy!DeepSeek集成测试必须监控的5个隐性指标(P99首token延迟、context bleed率、tool-call schema漂移)

更多请点击&#xff1a; https://intelliparadigm.com 第一章&#xff1a;DeepSeek集成测试的核心范式演进 DeepSeek大模型的工程化落地对集成测试提出了全新挑战&#xff1a;传统基于接口响应码与字段校验的测试范式已难以覆盖语义一致性、推理链鲁棒性、上下文敏感度等高阶质…...

学术写作创新突破!2026全流程AI论文工具精选指南

2026 年 AI 论文写作工具已进入全流程闭环 学术合规时代&#xff0c;千笔 AI&#xff08;综合评分 99 分&#xff09;中文学术场景标杆&#xff1b;Grammarly Academic与Elicit为英文论文写作首选&#xff1b;按需求匹配度 - 数据可信度 - 成本承受力三维模型选型&#xff0c;…...

保姆级教程:Windows系统下Arcgis 10.2从下载、安装到汉化一次搞定(附常见License启动失败解决方案)

Windows系统下Arcgis 10.2完整安装与汉化实战指南第一次接触Arcgis的新手往往会被复杂的安装流程和神秘的License Manager搞得晕头转向。作为一款功能强大的地理信息系统软件&#xff0c;Arcgis在科研、城市规划、环境监测等领域有着广泛应用&#xff0c;但它的安装过程确实会让…...

淘宝淘金币自动化脚本终极指南:如何每天节省25分钟实现智能任务管理

淘宝淘金币自动化脚本终极指南&#xff1a;如何每天节省25分钟实现智能任务管理 【免费下载链接】taojinbi 淘宝淘金币自动执行脚本&#xff0c;包含蚂蚁森林收取能量&#xff0c;芭芭农场全任务&#xff0c;解放你的双手 项目地址: https://gitcode.com/gh_mirrors/ta/taoji…...

Unity/Unreal开发者必看:用手机和陀螺仪实验,5分钟搞懂万向节死锁(附避坑指南)

Unity/Unreal开发者实战指南&#xff1a;用手机陀螺仪5分钟破解万向节死锁当你调试第一人称视角时&#xff0c;角色突然卡在墙面无法转动&#xff1b;当无人机模型在俯冲90度时失控乱转——这些很可能都是万向节死锁(Gimbal Lock)在作祟。作为实时3D开发中最恼人的数学陷阱之一…...

万星easy-vibe:描述需求即发布 零基础无需学语法

开源Easy-Vibe是一套开源AI编程学习方案&#xff0c;把学习顺序从先学语法再做项目翻转为直接做项目。文章拆解了项目驱动、提示词编写、AI编辑器和多Agent协作的完整流程&#xff0c;解释了为什么想法比语法更重要。 github上datawhalechina/easy-vibe&#xff1a;它在GitHub…...

3步快速部署:智能茅台抢购平台的终极自动化解决方案

3步快速部署&#xff1a;智能茅台抢购平台的终极自动化解决方案 【免费下载链接】campus-imaotai i茅台app自动预约&#xff0c;每日自动预约&#xff0c;支持docker一键部署&#xff08;本项目不提供成品&#xff0c;使用的是已淘汰的算法&#xff09; 项目地址: https://gi…...

结肠“瑞士卷”制片法

在肠道病理研究中&#xff0c;如何完整保留小鼠结肠的全层结构、同时避免人为损伤&#xff0c;一直是实验操作的难点。本文分享一套改良版“瑞士卷”制片技术&#xff0c;无需剖开肠管、无需机械顶压&#xff0c;即可获得高质量的全结肠切片&#xff0c;特别适合炎症、隐窝异常…...

原来专业的赛事专用匹克球厂家有这么多门道?

引言在匹克球运动蓬勃发展的当下&#xff0c;专业赛事专用匹克球的选择至关重要。很多人可能不知道&#xff0c;看似普通的赛事专用匹克球背后&#xff0c;其实隐藏着诸多门道。接下来&#xff0c;我们就一起深入探究专业赛事专用匹克球厂家的秘密。核心技术与材料的门道专业赛…...