shell scripts: one to read the file line

Reprinted shell scripts: one to read the file line, and the output written a collection:
#! / Bin / bash
while read line
do
echo $ line # here may change based on actual use
done <urfile

Written b:

#! / Bin / bash

cat urfile | while read line
do
echo $ line
done

Note: The above code was read for the document urfile

分类:OS 时间:2010-03-18 人气:209
分享到:
blog comments powered by Disqus

相关文章

  • Bash shell scripts to use functional testing 2010-06-17

    Functional testing is a key part of software development - and have loaded Linux, Bash can help you easily complete the functional tests. In this article, Angel Rivera will explain how to use the Bash shell script to run through the Linux command lin

  • 10 Tools To Add Some Spice To Your UNIX Shell Scripts 2010-08-17

    T here are some misconceptions that shell scripts are only for a CLI environment. You can easily use various tools to write GUI and / or network (socket) scripts under KDE or Gnome desktops. Shell scripts can make use of some of the GUI widget ( menu

  • Learning Shell Scripts 2010-08-24

    If you really want to go this route information, and you want Haohao De manage is your host, then do not tell your brother not to mention birds, Shell Scripts really need to study a subject too! Basically, shell script somewhat like the earlier batch

  • Learning Shell Scripts (2) 2010-08-24

    『Calculated for a few days left on ex-date? 』 In other words: let users enter their ex-date; then ex-date than the date now; by the comparison of two dates to show a few days 』 『 also need to be able to discharge the words. Is very hard to seem like?

  • A comprehensive study of Linux shell scripts 2010-11-04

    Transfer source: Linux commune Author: Linux http://www.linuxidc.com/Linux/2007-06/4767.htm 1. Linux-based scripting Introduction 1.1 Basic syntax 1.1.1 at the beginning Program must begin with the following line (be the first line in the file side):

  • Create and run shell scripts 2010-05-12

    shell script that contains one or more command files. shell script provides a lengthy command execution, large or complex command sequences, and routine tasks simple way. When you enter the name of shell script file, the system will execute the file

  • Top DBA Shell Scripts for Monitoring the Database 2010-08-19

    Basic UNIX Command The following is a list of commonly used Unix command: + ps - Show process + grep - Search files for text patterns + mailx - Read or send mail + cat - Join files or display them + cut - Select columns for display + awk - Pattern-ma

  • Linux system shell scripts to determine the variable file directory: permission. Exists. Empty. Equal 2011-05-06

    Linux system shell scripts to determine the variable file directory: permission exists, null value, equal The first to write some of the basic syntax: 1, the string to determine str1 = str2 When two strings have the same content, the length of time i

  • Bukanhouhui Shell scripts for Linux production servers to share 2011-03-06

    Bukanhouhui Shell scripts for Linux production server share as a Linux / unix system administrator, I often encounter people ask this question: shell do? PHP so powerful, why not use PHP to complete the work? In fact, relative to the PHP development

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

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

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

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