[root@yrzl-cloud-aio ~]# sh b.sh
b.sh: line 12: warning: here-document at line 7 delimited by end-of-file (wanted `rui')
b.sh: line 13: syntax error: unexpected end of file
[root@yrzl-cloud-aio ~]#
[root@yrzl-cloud-aio ~]#
[root@yrzl-cloud-aio ~]# ls
anaconda-ks1.cfg  CentOS-7-x86_64-DVD-1511.iso  ifcfg-enp9s0  iso    ll    m.sh     packages  qinrui    rr    sou                   yr-cloud-picture-static-ip.iso
anaconda-ks.cfg   i                             ins-packages  k.sh   mmmm  n.sh     pgs       r         rrrr  wget-log
b.sh              ifcfg-enp8s0                  i.sh          ks.sh  mn    package  p.sh      rpmbuild  ruiy  yr-cloud-picture.iso
[root@yrzl-cloud-aio ~]#
[root@yrzl-cloud-aio ~]#
[root@yrzl-cloud-aio ~]# cat b.sh
#!/bin/bash
i=0
for ifMacs in `ifconfig  | grep ether | awk -F' ' '{print $2}' | head -n 2`
do
        #echo $ifMacs
        if [ -z /etc/udev/rules.d/70-persistent-ipoib.rules ];then
        cat >> /etc/udev/rules.d/70-persistent-ipoib.rules <<rui
        SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"${ifMacs}\", ATTR{dev_id}==\"0x0\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"eth{i}\"
        ruiy
        fi
i=$((i + 1))
done
[root@yrzl-cloud-aio ~]#

warning: here-document at line 7 delimited by end-of-file (wanted `rui')的更多相关文章

  1. bash报错./mq.sh: line 15: warning: here-document at line 10 delimited by end-of-file (wanted `eof')

    [root@localhost tmp]# ./mq.sh./mq.sh: line 15: warning: here-document at line 10 delimited by end-of ...

  2. input01.sh: line 11: warning: here-document at line 4 delimited by end-of-file (wanted `EOF') input01.sh: line 12: syntax error: unexpected end of file

    写了个脚本用cat>>EOF报错如下: input01.sh: line 11: warning: here-document at line 4 delimited by end-of- ...

  3. 解决Warning: unlink(/storage/cache/cache.catalog.language.1556158719): No such file or directory in /system/library/cache/file.php on line 68问题

    ytkah在调试opencart项目时提示Warning: unlink(/storage/cache/cache.catalog.language.1556158719): No such file ...

  4. Evaluation Warning : The document was created with Spire.PDF for .NET.

    由于使用  Spire.Pdf 生成的书签带有 Evaluation Warning : The document was created with Spire.PDF for .NET. 字样 但是 ...

  5. An error occurred at line: 1 in the generated java file问题处理

    tomcat6启动后,加载jsp页面报错,提示无法将jsp编译为class文件,主要报错信息如下: An error occurred at line: 1 in the generated java ...

  6. 报错:An error occurred at line: 22 in the generated java file The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

    org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 22 in ...

  7. -bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8mb4): No such file or directory

    前几天登录服务器发现出现了这些个警告,一直没时间去处理他,今天难得有空,处理一下并记录下来,希望可以帮助到有需要的朋友. 警告信息如下: Last login: Tue May :: from 192 ...

  8. 解决UE4项目编辑器启动时出现LogLinker: Warning: Failed to load '/Game/FirstPersonBP/FirstPersonOverview': Can't find file.

    UE4版本:4.24.3源码编译版本 Windows10 + VS2019环境 LogLinker: Warning: Failed to load '/Game/FirstPersonBP/Firs ...

  9. shell函数中eof报错(warning: here-document at line 9 delimited by end-of-file (wanted `EOF'))

    在shell编写函数时,函数中有eof和EOF,如果是在sublime编写按照格式tab缩进会有以下报错 解决办法: 取消函数中的tab缩进,在运行即可

随机推荐

  1. django 加日志

    LOGGING = { 'version': 1, 'disable_existing_loggers': False, # 指定输出的格式,被handler使用. 'formatters': { ' ...

  2. 关于JS中的方法是否加括号的问题

    js中的方法什么时候加括号什么时候不加括号呢,我们有时候经常就搞不清楚,记住下面这几点就好理解了. 1.函数做参数时都不要加括号. function fun(a){ alert(a); } funct ...

  3. JAVA如何获得数据库的字段及字段类型

    Java获取数据库的表中各字段的字段名,代码如下: import java.sql.Connection;import java.sql.DriverManager;import java.sql.R ...

  4. [luogu3155 CQOI2009] 叶子的染色(树形dp)

    传送门 Solution 十分简单的树形dpQwQ,转移关系:父亲染了儿子不用染 只需要确定根就是简单树形dp,而其实根可以随便取一个非叶子节点 可以分情况讨论发现答案并不会改变 Code //By ...

  5. 第三节:Web爬虫之BeautifulSoup解析库

    Beautiful Soup官方说明: Beautiful Soup提供一些简单的.python式的函数用来处理导航.搜索.修改分析树等功能.它是一个工具箱,通过解析文档为用户提供需要抓取的数据,因为 ...

  6. 【MFC Programming】 Using Dialog To Set A Correlate Menu

    This blog will show how to display a menu we designed in a dialog. 1.Insert a new dialog& a new ...

  7. lambda表达式与委托与线程初步谈论-基于刘铁锰视频观后操作

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  8. 【codeforces 785D】Anton and School - 2

    [题目链接]:http://codeforces.com/contest/785/problem/D [题意] 给你一个长度为n的括号序列; 让你删掉若干个括号之后,整个序列变成前x个括号为左括号,后 ...

  9. nyoj_111_分数加减法_201311281341

    分数加减法 时间限制:3000 ms  |           内存限制:65535 KB 难度:2   描述 编写一个C程序,实现两个分数的加减法   输入 输入包含多行数据 每行数据是一个字符串, ...

  10. mongodb之存储引擎

    前言 存储引擎是Mongodb管理数据存储主要的组件,Mongodb支持多种存储引擎,每种存储引擎适合特定的场景 WiredTiger 特性 1. version >= 3.2版本默认存储引擎2 ...