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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT OPENSOLARIS
auplay
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)