Sponsored Content
Top Forums Shell Programming and Scripting how to get the data from line number 1 to line number 100 of a file Post 302253773 by chrisperry on Sunday 2nd of November 2008 10:23:33 AM
Old 11-02-2008
PHP

Well, what about reading a part of the line? I tried this:
Code:
 sed '/exp1/,/exp2/p' text.txt

But it returned whole file.

Last edited by chrisperry; 11-02-2008 at 11:33 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Appending the line number and a seperator to each line of a file ?

Hi, I am a newb as far as shell scripting and SED goes so bear with me on this one. I want to basically append to each line in a file a delimiter character and the line's line number e.g Change the file from :- aaaaaa bbbbbb cccccc to:- aaaaaa;1 bbbbbb;2 cccccc;3 I have worked... (4 Replies)
Discussion started by: pjcwhite
4 Replies

2. Shell Programming and Scripting

Appending line number to each line and getting total number of lines

Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me. I have a file say: abc def ccc ddd ffff The output should be: Instance1=abc Instance2=def Instance3=ccc Instance4=ddd Instance5=ffff ... (2 Replies)
Discussion started by: chiru_h
2 Replies

3. Shell Programming and Scripting

Adding a columnfrom a specifit line number to a specific line number

Hi, I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers. To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies

4. 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

5. Shell Programming and Scripting

Find line number of bad data in large file

Hi Forum. I was trying to search the following scenario on the forum but was not able to. Let's say that I have a very large file that has some bad data in it (for ex: 0.0015 in the 12th column) and I would like to find the line number and remove that particular line. What's the easiest... (3 Replies)
Discussion started by: pchang
3 Replies

6. Shell Programming and Scripting

search a string in a particular column of file and return the line number of the line

Hi All, Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example : abc.txt 7000,john,2,1,0,1,6 7001,elen,2,2,0,1,7 7002,sami,2,3,0,1,6 7003,mike,1,4,0,2,1 8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies

7. Shell Programming and Scripting

Write $line number into textfile and read from line number

Hello everyone, I don't really know anything about scripting, but I have to manage to make this script, out of necessity. #!/bin/bash while read -r line; do #I'm reading from a big wordlist instructions using $line done Is there a way to automatically write the $line number the script... (4 Replies)
Discussion started by: bobylapointe
4 Replies

8. Shell Programming and Scripting

Replace first number of each line in a file with another number

Hi, I have a set of files in a directory that I have to read and replace the first occurrence of a number with another dummy number. This is what I have so far but it does not seem to work. The files have lot of other data in each row and each data element is separated by ,@, for file in... (13 Replies)
Discussion started by: scorpioraghu
13 Replies

9. Shell Programming and Scripting

Cut from specific line number to a line number

Hi All, I've a file like this.. Sheet1 a,1 a,2 a,3 a,4 a,5 Sheet2 a,6 a,7 a,8 a,9 a,10 Sheet3 a,11 a,12 a,13 (7 Replies)
Discussion started by: manab86
7 Replies

10. Shell Programming and Scripting

sed command to replace a line in a file using line number from the output of a pipe.

Sed command to replace a line in a file using line number from the output of a pipe. Is it possible to replace a whole line piped from someother command into a file at paritcular line... here is some basic execution flow.. the line number is 412 lineNo=412 Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies
AUPLAY(1)						      General Commands Manual							 AUPLAY(1)

NAME
auplay - play a sound file to a Network Audio System server SYNOPSIS
auplay [-audio servername] [-volume 0-100] [-i] [-I] [-l] files... DESCRIPTION
The auplay program can be used to play audio data stored in the .SND, .AU, or .WAV formats common on Sun workstations and PCs. It is typi- cally used from shell scripts or command line procedures. If no filenames are given on the command line, audio data will be read fron stdin, unless the -l option is given. OPTIONS
The following options may be used with the auplay program: -audio servername This option specifies the Network Audio System server on which the files should be played. -volume 0-100 This option specifies the volume at which the data should be played as a percentage of the maximum possible volume. The default is 100 percent. -i This option indicates that the header information associated with the sound data should be printed along with playing the data. -I This option indicates that the header information associated with the sound data should be printed instead of playing the data. -l This option indicates that a list of filenames is to be read from stdin. auplay will play these files after playing any files given explicitly as command line arguments. SEE ALSO
nas(1), auctl(1), audemo(1), autool(1) COPYRIGHT
Copyright 1993, 1994 Network Computing Devices, Inc. AUTHOR
Greg Renda, Network Computing Devices, Inc. 1.9.3 AUPLAY(1)
All times are GMT -4. The time now is 05:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy