Shell中通过cat配合重定向能够生成文件 cat << EOF >/path/filename EOF
参考:
http://www.tuicool.com/articles/i26NbqF
EOF只是一个分界符,当然也可以用abcde替换。
当shell遇到<<时,它知道下一个词是一个分界符。在该分界符以后的内容都被当作输入,直到shell又看到该分界符(位于单独的一行)。
通过cat配合重定向能够生成文件并追加操作
$ cat << EOF >/path/filename # 也可以使用>>对文件进行追加
your content
> EOF
cat /path/filename
your content
相关推荐
<% if session("ok")<>"" then %> <form id="form3" name="form3" method="post" action=""> <table width="98%" border="1" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><div align="center">发表...
<TR><TD Align=Right ColSpan=7><font face="宋体"><Font Color=Red>总价格=<%=Sum%></Font></font></TD></TR> </TABLE> <Input Type=Submit Value=" 更改数量 "> </Form> <hr> <a href=tj.htm> <font size="5">提交...
<p align="center">本期考试 <font color=red><%=pd%></font> 道判断题,<font color=red><%=xz%></font> 道选择题,<font color=red><%=tk%></font> 道填空题,总分 <font color=red><%=zfen%></font> 分</td> ...
<% '-------------------------------------------------------------------- ' Microsoft ADO ' ' Copyright (c) 1996-1998 Microsoft Corporation. ' ' ' ' ADO constants include file for VBScript ' '---------...
cat > 文件名 << EOF 用于创建一个名为“文件名”的文件,之后输入的任何内容都是写入文件的内容,最后以EOF完成输入。 cat <<EOF 和 cat <<-EOF的区别 在输入内容时,EOF是作为结束输入的字符。...
<% do while not (rs.eof or err)%> <tr> <td width="100%" style="BACKGROUND-COLOR: cornsilk"><input type="radio" name="bookchange" value="<%=rs(0)%>"><%=rs(1)%></td> </tr> <%rs.MoveNext loop%...
<td width="202" height="84"><a href="<%=rswebsite("web_firstpage")%>"><img src="<%=rswebsite("web_logo")%>" alt="logo" name="logo" width="200" height="60" border="0" id="logo" /></a></td> <td width=...
IF Request.QueryString("delid")<>"" Then %> <script language="VBScript"> Dim MyVar MyVar=MsgBox("确定要清空该考生考试资料吗?",4) if MyVar=vbYes then <% set rs=server.createobject("ADODB.recordset") ...
if request.QueryString("iPage")<>"" then iPage=CInt(request.QueryString("iPage")) 'if iPage<1 then iPage=1 'if iPage>rs.pageCount then iPage=rs.pageCount else ...
<!--#include file="const.asp" --> <!--#include file="../conn.asp" --> <% if request.cookies("username")="" then ... <div align="center"> [<a href="default.asp">返回主页</a>] </form> </body> </html>
<% While (NOT rs.EOF) %> <table cellpadding="2" cellspacing="0" width=700 style=" border-bottom:inset #888 thin;"> <tbody><tr> <td height="30" nowrap="nowrap" align=left><img src="img/arrow....
If Intcatid <> 0 Then rs.open "select category from category where categoryid="&Intcatid&" ",conn,1,1 strcategory = trim(rs("category")) rs.close strcat = strcat &"-><a href=chknews.asp?catid="&...
> </p> </div></td> </tr> <tr> <td></td> </tr></table></center></div><div align="center"><center><table width="113" border="1" cellspacing="0" cellpadding="...
<br/>12 MySQL 实用程序<br/>12.1 各种 MySQL 程序概述 <br/>12.2 管理一个 MySQL 服务器 <br/>12.3 从 MySQL 数据库和表中倒出(dump)结构和数据 <br/>12.4 从文本文件导入数据 <br/>12.5 MySQL 压缩只读表生成器 ...
"><br> <%<br> sFileName = "alter_manage.asp"<br> tableName = "C_alter"<br> tableName2 = "product"<br> action = Trim(Request.QueryString("action"))<br> %><br> <br> <%<br> Select Case action<br> case ...
<% do until rs.EOF %> <tr> <form method="post" action="delete_record_submit_jerrel.asp"> <% 'show the values of the MID column and create a button for the MID column for each x in rs.Fields if x.name...
<title><%=strbiaoti%></title> <meta name="keywords" content="<%=strbiaoti%>" /> <meta name="description" content="<%=strbiaoti%>" /> </head> <body> <h1><%=strbiaoti%></h1> <h5><%=time%></h5> <h2><%=...
检查网络cat << EOF | sudo tee /etc/modules-load.d/k8s.confbr_netfilterEOFcat << EOF | sudo tee /etc/sysctl.d/k8s.confnet.bridge.bridge-nf-call-ip6tables = 1...
</B><B>LinkTo</B><B>模式(去收银台)</B></P> <p> <p> 该模式通过点击触发事件onclick来调用并执行PayMent.asp,并关闭当前购物篮。该事件不能对所购买的商品数量的更改而更改,只能通过确认...
二叉树的相关操作 #include<string.h> #include<ctype.h> #include<malloc.h> /* malloc()等 */ #include<limits.h> /* INT_MAX等 */ #include<stdio.h> /* EOF(=^Z或F6),NULL */ #include<stdlib.h> /* atoi() */ #...