在bash中IFS是内部的域分隔符,manual中对其的叙述如下:
IFS The Internal Field Separator that is used for word splitting after expansion and to split lines into words with the read builtin command. The default value is ''.

#!/bin/sh
IFS="#"
p_commands="./sh01.sh#./sh05.sh"
for w in $p_commands
do
eval "$w"
done

会本别执行sh01和sh02

如果#IFS="#",运行报错

shell IFS的更多相关文章

  1. Linux Shell 高级变量及字符串

    高级变量包含三个部分1.变量扩展2.命令替换3.算术扩展在Bash Shell中,$算符会触发到上述三种扩展,基本形式如下:    基本型             扩展种类            例子 ...

  2. shell学习(9)- du和df区别及详解

    清明小长假来加班,总得干点啥吧,今天就说说du 和df的区别. 1.区别 du,disk usage,是通过搜索文件来计算每个文件的大小然后累加,du能看到的文件只是一些当前存在的,没有删除的.他计算 ...

  3. 【转】SHELL中的IFS详解

    转自:http://smilejay.com/2011/12/bash_ifs/ 在bash中IFS是内部的域分隔符,manual中对其的叙述如下: IFS The Internal Field Se ...

  4. shell学习笔记(1):利用IFS打印用户和默认shell

    参考资料为:linux shell脚本攻略 作者sarath Lakshman 人民邮电出版社 shell:读取文件的每一行内容并输出 的写法1 目的:读取passwd文件,获得用户名和其默认的she ...

  5. 【转】shell中IFS用法

    http://blog.itpub.net/27181165/viewspace-775820/ 一 IFS的介绍   Shell 脚本中有个变量叫IFS(Internal Field Seprato ...

  6. Shell中IFS用法

    一 .IFS的介绍    Shell 脚本中有个变量叫IFS(Internal Field Seprator) ,内部域分隔符.完整定义是The shell uses the value stored ...

  7. shell中的IFS详解

    在bash中IFS是内部的域分隔符,manual中对其的叙述如下:IFS The Internal Field Separator that is used for word splitting af ...

  8. 转 shell中字分隔的妙用:变量IFS

    IFS 的全称是 Interal Field Separator  ,即"内部区域分隔符",它也是一个内置环境变量,存储着默认的文本分隔符,默认下这分隔符是空格符(space  c ...

  9. Shell中的IFS

    一.IFS 介绍 Shell 脚本中有个变量叫 IFS(Internal Field Seprator) ,内部域分隔符.完整定义是The shell uses the value stored in ...

随机推荐

  1. field-symbols: <ATTR> type ANY.

    field-symbols: type ANY. * importing iv_root_list type refer to if_genil_cont_root_objectlist DATA l ...

  2. HTTP请求响应报文 - 相关状态码 - GET_POST请求方法

    HTTP请求报文: 一个HTTP请求报文由四个部分组成:请求行.请求头部.空行.请求数据 1.请求行 请求行由请求方法字段.URL字段和HTTP协议版本字段3个字段组成,它们用空格分隔.比如 GET ...

  3. C#/ASP.NET应用程序配置文件app.config/web.config的增、删、改操作,无法为请求的 Configuration 对象创建配置文件。

    应用程序配置文件,对于asp.net是 web.config,对于WINFORM程序是 App.Config(ExeName.exe.config). 配置文件,对于程序本身来说,就是基础和依据,其本 ...

  4. python SMTP

    一.一开始,相信SMTP服务,所以在本机安装了一个 apt-get install sendmail apt-get install sendmail-cf apt-get install squir ...

  5. react native 中使用react-native-vector-icons

    1.引入依赖 cnpm install react-native-vector-icons --save 2.LINK原生 react-native link react-native-vector- ...

  6. jQuery-使用hover(fn,fn)函数监听mouseover和mouseout两个事件

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  7. laravel中使用event

    https://www.cnblogs.com/ziyouchutuwenwu/p/4274539.html

  8. tp 例子=登录逻辑

    <?php namespace Home\Controller; use Think\Controller; class LoginController extends Controller{ ...

  9. hdu2262 高斯消元

    题目:有一个地图,一个人从某个点出发,问走到花园的期望步数为多少 设某点的期望步数为Ei. 那么目标的Ei=0. Ei=(Enext1+Enext2……Enextk)/k+1. 为什么是这个公式 因为 ...

  10. C. Primes or Palindromes?

    prime numbers non greater than n is about . We can also found the amount of palindrome numbers with ...