for NAME in joe jane julie
do
ADDRESS="$NAME@example.com"
MESSAGE='Projects are due today!'
echo $MESSAGE | mail -s Reminder $ADDRESS
done

for name in loop Shell的更多相关文章

  1. Linux(16):Shell编程(3)

    vim 编程环境配置: .vimrc 文件配置如下:(.vimrc文件放到家目录下:/root :然后退出 xshell 再登陆进来xshell) set nocompatible set histo ...

  2. Linux Bash Script loop

    Linux Bash Script loop shell 编程之流程控制 for 循环.while 循环和 until 循环 for var in item1 item2 ... itemN do c ...

  3. 2. ansible-playbook 条件语句-内部变量使用

    内部变量指的是把变量定义在playbook里面或者是执行结果作为变量 循环语句-标准Loops [root@LeoDevops playb]# cat p_loop.yaml - hosts: u12 ...

  4. ansible使用7-Loops

    Standard Loops with_items - name: add several users user: name={{ item }} state=present groups=wheel ...

  5. linux shell 报错 Syntax error: Bad for loop variable

    在linux下写了一个简单的shell,循环10次. test.sh #!/bin/bash ## ##循环10次 ## ; i<; i++)); do echo Good Morning ,t ...

  6. Bash For Loop Examples for Your Linux Shell Scripting--ref

    There are two types of bash for loops available. One using the “in” keyword with list of values, ano ...

  7. continue — Skip to the next iteration of a loop in a shell script

    continue — Skip to the next iteration of a loop in a shell script

  8. shell脚本:Syntax error: Bad for loop variable错误解决方法(转)

    Linux Mint中写了一个简单的shell脚本,利用for..do..done结构计算1+2+3......+100的值,结果执行"sh -n xxx.sh"检测语法时总是报错 ...

  9. 第十三章、学习 Shell Scripts 循环 (loop)

    while do done, until do done (不定循环) while [ condition ] <==中括号内的状态就是判断式 do <==do 是回圈的开始! 程序段落 ...

随机推荐

  1. Binary Tree Traversal

    1.Preorder Traversal Given a binary tree, return the preorder traversal of its nodes' values. For ex ...

  2. UIImage加载图片的两种方法区别

    Apple官方的文档为生成一个UIImage对象提供了两种方法加载图片: 1. imageNamed,其参数为图片的名字: 2. imageWithContentsOfFile,其参数也是图片文件的路 ...

  3. 在WAS 中建立db2 dataSource

    1: 安全性->JAAS配置->J2C认证数据: 新建-> 名称(随意起) 数据库用户名 密码.数据库密码 2:应用程序服务器?server1?Web容器?会话管理?分布式环境设置 ...

  4. 144. Binary Tree Preorder Traversal

    Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tr ...

  5. Web端文件打包.zip下载

    使用ant.jar包的API进行文件夹打包.直接上代码: String zipfilename = "test.zip"; File zipfile = new File(zipf ...

  6. Baxter机器人---Hello_baster(二)

    原创博文,转载请标明出处:--周学伟http://www.cnblogs.com/zxouxuewei/ Step 1: Setup ROS Environment root@zxwubuntu-As ...

  7. php部分--例子:租房子(复选框的全选、数组拼接成字符串、设置复选框的name值、)

    1.链接数据库 <?php include("DBDA.class.php"); $db=new DBDA(); $sql="select * from fangz ...

  8. ✡ leetcode 156. Binary Tree Upside Down 旋转树 --------- java

    156. Binary Tree Upside Down Add to List QuestionEditorial Solution My Submissions   Total Accepted: ...

  9. 要将serviceLocator注入到任何类中

    如果想要在任何类中都用到zf2的serviceLocator, 在类中实现serviceLocatorAwareInterface,然后getServiceConfig 方法中注册成服务即可直接使用该 ...

  10. POJ-2528 Mayor's posters (线段树区间更新+离散化)

    题目分析:线段树区间更新+离散化 代码如下: # include<iostream> # include<cstdio> # include<queue> # in ...