liinux read the file

shell read file line by line

#! / Bin / ksh

exec 6 <. / test.txt
while read-u6 line
do
echo 'prompt Creating' $ (line)>> a.txt
echo'========================'>> a.txt
echo '@@'${ Line )>> a.txt
done
exec 6 <& -

分类:OS 时间:2010-03-05 人气:199
本文关键词: lt amp exec shell
分享到:
blog comments powered by Disqus

相关文章

  • php使用exec shell命令注入的方法讲解 2014-05-03

    exec()是用于执行shell命令的函数,下面说的就是如何使用他用于shell注入的方法讲解 使用系统命令是一项危险的操作,尤其在你试图使用远程数据来构造要执行的命令时更是如此.如果使用了被污染数据,命令注入漏洞就产生了. exec()是用于执行shell命令的函数.它返回执行并返回命令输出的最后一行,但你可以指定一个数组作为第二个参数,这样输出的每一行都会作为一个元素存入数组.使用方式如下: <?php $last = exec('ls', $output, $return); print_

  • exec shell command to establish a tcp connection and close connection 2011-09-01

    shell command to directly communicate with the java process to port, then you can use the exec 8> / dev/tcp/172.27.24.12/11111; if [ "$?" != "0" ];then echo "open $host $port fail!"; exit 1; fi echo "test">&am

  • Java执行Runtime.exec(shell)报Cannot allocate memory 2014-06-05

    在Linux下用java的Runtime.getRuntime().exec(cmd)方式,执行shell脚本时,遇到"Cannot allocate memory"的错误. 网上查询资料整理如下: Cannot allocate memory 在Linux上调试一个比较复杂的Java程序,称为JavaA吧,JavaA会频繁的通过Process proc = Runtime.getRuntime().exec(cmd);调用一些外部程序.在系统负载和该程序占用内存都比较大的情况下,会出

  • java call the shell script, and get the result set example 2010-03-29

    /** * Run the shell script * @param shell Need to run the shell script */ public static void execShell(String shell){ try { Runtime rt = Runtime.getRuntime(); rt.exec(shell); } catch (Exception e) { e.printStackTrace(); } } /** * Run the shell * * @p

  • Linux Shell Command under 2010-08-04

    Shell command for detailed usage. adduser to create a new user account Set command alias alias bzips. bz2 file compression program cal show calendar cat all output to standard output the contents of chfn change the finger command displays information

  • Linux Shell commands more use 2010-08-06

    Shell command for detailed usage. adduser to create a new user account alias set alias command bzips. bz2 file compression program cal show calendar cat all output to standard output the contents of chfn change the finger command displays information

  • Shell commands under Linux 2010-08-10

    Shell commands under Linux adduser to create a new user account alias set alias command bzips. bz2 file compression program cal show calendar cat all output to standard output the contents of chfn finger commands to change the information displayed c

  • Shell command for detailed usage. 2010-08-10

    Shell command for detailed usage. adduser to create a new user account alias set alias command bzips. bz2 file compression program cal show calendar cat all output to standard output the contents of chfn finger commands to change the information disp

  • MySQL introduced automated testing framework 2010-11-07

    1 Overview Playing in our patch to MySQL, not only need to test new features, while the more important issue is the need for the return of the original features - the new patch if the other functions have led to the original bug, to outweigh the bene

  • find command to find the content of the file containing the specified 2011-03-30

    find. | xargs grep x find.-exec grep x {} \; find /-name "httpd.conf" find /-name "rsync" Why is this energy, because the channel command symbol is to pass on the results of a next step to deal with the find. | Grep x, although seeming

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.096 (s). 12 q(s)