<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shell on 生如夏花</title><link>https://DBL2017.github.io/tags/shell/</link><description>Recent content in Shell on 生如夏花</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 03 Nov 2025 10:13:12 +0800</lastBuildDate><atom:link href="https://DBL2017.github.io/tags/shell/index.xml" rel="self" type="application/rss+xml"/><item><title>shell中IFS导致命令执行失败的问题记录</title><link>https://DBL2017.github.io/post/%E9%97%AE%E9%A2%98%E6%8E%92%E6%9F%A5/shell%E4%B8%ADifs%E5%AF%BC%E8%87%B4%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E5%A4%B1%E8%B4%A5%E7%9A%84%E9%97%AE%E9%A2%98%E8%AE%B0%E5%BD%95/</link><pubDate>Mon, 03 Nov 2025 10:13:12 +0800</pubDate><guid>https://DBL2017.github.io/post/%E9%97%AE%E9%A2%98%E6%8E%92%E6%9F%A5/shell%E4%B8%ADifs%E5%AF%BC%E8%87%B4%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E5%A4%B1%E8%B4%A5%E7%9A%84%E9%97%AE%E9%A2%98%E8%AE%B0%E5%BD%95/</guid><description>IFS（Internal Field Separator）是shell中的一个特殊**环境变量**，用于定义字段分隔符，决定了shell在进行单次分割时如何将输入行为拆分为多个字段。排查修改IFS之后导致for循环中执行fw_s_add命令执行失败的问题，原因在于IFS影响到fw_s_add函数内部。</description><tags>Shell IFS 问题排查 Fw_s_add</tags><summary>&lt;p&gt;IFS（Internal Field Separator）是shell中的一个特殊&lt;strong&gt;环境变量&lt;/strong&gt;，用于定义字段分隔符，决定了shell在进行单次分割时如何将输入行为拆分为多个字段。&lt;/p&gt;
&lt;p&gt;排查修改&lt;code&gt;IFS&lt;/code&gt;之后导致&lt;code&gt;for&lt;/code&gt;循环中执行&lt;code&gt;fw_s_add&lt;/code&gt;命令执行失败的问题，原因在于&lt;code&gt;IFS&lt;/code&gt;影响到&lt;code&gt;fw_s_add&lt;/code&gt;函数内部。&lt;/p&gt;</summary></item></channel></rss>