Sponsored Content
Top Forums Shell Programming and Scripting how to echo the file contents LINE BY LINE Post 99732 by zazzybob on Tuesday 21st of February 2006 05:00:52 AM
Old 02-21-2006
Code:
while read line; do
  echo "${line}"
done < ABC

Cheers
ZB
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unable to display correctly the contents of a file without a line feed

I am using AIX and ksh. I need to display the contents of a file that has a pid (process id). Because the file is open, it doesn't have the line feed or new line, so for some reason if I do this: `cat $pid` , where $pid is the name of the fully qualified file, it displays test3.sh: 426110:... (1 Reply)
Discussion started by: Gato
1 Replies

2. Shell Programming and Scripting

Script to change file contents line by line

Hi, I'm struggling to write a script to do the following, -will go through each line in the file -in a specific character positions, changes the value to a new value -These character positions are fixed througout the file ----------------------- e.g.: file1.sh will have the following 3... (4 Replies)
Discussion started by: vini99
4 Replies

3. Shell Programming and Scripting

Search a pattern in a file with contents in a single line

Hi all I am searching for a pattern in a file . The file content is in a single line.If am doing a grep or sed for the a particular pattern am getting whole file. I want the result in different lines. attaching the file for reference search pattern "/xxxxxx/hhhh/tttttttt/sss/" and... (4 Replies)
Discussion started by: sparks
4 Replies

4. Shell Programming and Scripting

move contents from one file to another based on line number or content

I want a script that will move everything beyond a certain line number or beyond a certain content word into another file. For example, if file A has this: first line second line third line forth line fifth line sixth line I want to run a script that will move everything beyond the third... (4 Replies)
Discussion started by: robp2175
4 Replies

5. UNIX for Dummies Questions & Answers

How to read contents of a file from a given line number upto line number again specified by user

Hello Everyone. I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below: if ; then if ; then tail +$1 $3 | head -n $2 else ... (5 Replies)
Discussion started by: grc
5 Replies

6. Shell Programming and Scripting

File Reading for a certain string and echo the line before

Hi Guys, I have a big file like this. It has cache group line ( the bold lines ) and then followed by 10 status lines showing either Compelte or Failed. This pattern repeats several time. We can assume all the status lines have either Complete or Failed status for that Cache Group line. I... (13 Replies)
Discussion started by: MKNENI
13 Replies

7. Shell Programming and Scripting

how to read the contents of two files line by line and compare the line by line?

Hi All, I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies

8. Shell Programming and Scripting

sed to replace specific positions on line with file contents

Hi, I am trying to use an awk command to replace specific character positions on a line beginning with 80 with contents of another file. The line beginning with 80 in file1 is as follows: I want to replace the 000000000178800 (positions 34 - 49) on this file with the contents of... (2 Replies)
Discussion started by: nwalsh88
2 Replies

9. Shell Programming and Scripting

How to read each line from input file, assign variables, and echo to output file?

I've got a file that looks like this (spaces before first entries intentional): 12345650-000005000GL140227 ANNUAL HELC FEE EN 22345650-000005000GL140227 ANNUAL HELC FEE EN 32345650-000005000GL140227 ANNUAL HELC FEE EN I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies

10. Shell Programming and Scripting

Echo printing a line in 2 lines; expected to print in one line

Dear All, fileName: therm.txt nc3h7o2h 7/27/98 thermc 3h 8o 2 0g 300.000 5000.000 1390.000 41 1.47017550e+01 1.71731699e-02-5.91205329e-06 9.21842570e-10-5.36438880e-14 2 -2.99988556e+04-4.93387892e+01 2.34710908e+00 4.34517484e-02-2.65357553e-05 3 ... (7 Replies)
Discussion started by: linuxUser_
7 Replies
GEARMANWORKER(3)							 1							  GEARMANWORKER(3)

The GearmanWorker class

INTRODUCTION
CLASS SYNOPSIS
GearmanWorker GearmanWorker Methods o public bool GearmanWorker::addFunction (string $function_name, callable $function, [mixed &$context], [int $timeout]) o public bool GearmanWorker::addOptions (int $option) o public bool GearmanWorker::addServer ([string $host = 127.0.0.1], [int $port = 4730]) o public bool GearmanWorker::addServers (string $servers = 127.0.0.1:4730) o public void GearmanWorker::clone (void ) o public GearmanWorker::__construct (void ) o public bool GearmanWorker::echo (string $workload) o public string GearmanWorker::error (void ) o public int GearmanWorker::getErrno (void ) o public int GearmanWorker::options (void ) o public bool GearmanWorker::register (string $function_name, [int $timeout]) o public bool GearmanWorker::removeOptions (int $option) o public int GearmanWorker::returnCode (void ) o public bool GearmanWorker::setId (string $id) o public bool GearmanWorker::setOptions (int $option) o public bool GearmanWorker::setTimeout (int $timeout) o public int GearmanWorker::timeout (void ) o public bool GearmanWorker::unregister (string $function_name) o public bool GearmanWorker::unregisterAll (void ) o public bool GearmanWorker::wait (void ) o public bool GearmanWorker::work (void ) PHP Documentation Group GEARMANWORKER(3)
All times are GMT -4. The time now is 03:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy