Actually your requirement isn't quite as simple as you state it, because judging by your sample output you want to subtract it from the original value for that volume name, not just the previous one.
Try this:
Note that this assumes the units will always be "mb".
Hi All,
I have two files
file1:
abc,def,ghi,5,jkl,mno
pqr,stu,ghi,10,vwx,xyz
cba,ust,ihg,4,cdu,oqw
file2:
ravi,def,kishore
ramu,ust,krishna
joseph,stu,mike
I need two output file as follows
If field3 in file1 is same as field3 in the next line then the field4 should add... (1 Reply)
Hi, all
I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes.
sample input:
for this line, 5 fields are supposed to be extracted, they... (8 Replies)
plz help me!!
I have this file ,
3408 5600
3796 6035
4200 6285
4676 0
40 1554
200 1998
652 2451
864 2728
1200 0
I want it like if $2==0,replace it with field from the previous line+500
say here the o/p would be like
3408 5600
3796 6035
4200 6285... (16 Replies)
First, thanks for the help in previous posts... couldn't have gotten where I am now without it!
So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following:
If $1... (4 Replies)
Hi Guys
I have the following file
Essentially, I am trying to find the right awk/sed syntax in order to produce the following 3 distinct files from the file above:
Basically, I want to print the lines of the file as long as the second field of the current line is equal to the... (9 Replies)
I am trying to parse the input in awk to include the |gc= in $4 but am not able to. The below is close:
awk so far:
awk '{sub(/\|]+]++/, ""); print }' input.txt Input
chr1 955543 955763 AGRN-6|pr=2|gc=75 0 +
chr1 957571 957852 AGRN-7|pr=3|gc=61.2 0 +
chr1 970621 ... (7 Replies)
Hi,
I am trying to extract data where first field unique value and 4th field of next row is grater than first row 4th field.
input data is a below:
7035719974,20-jul-2016 07:42:51,07:42:51,074251,1
7035719974,20-jul-2016 07:43:57,07:43:57,074357,2
7399206761,20-jul-2016... (2 Replies)
I am trying to output a tab-delimited result that uses the data from a tab-delimited file to combine and subtract specific lines.
If $4 matches in each line then the first matching sequential $6 value is added to $2, unless the value is 1, then the original $2 is used (like in the case of line... (3 Replies)
In the awk below I am trying to set/update the value of $14 in file2 in
bold, using the matching NM_ in $12 or $9 in file2
with the NM_ in $2 of file1.
The lengths of $9 and $12 can be variable but what is consistent is the start pattern
will always be NM_ and the end pattern is always ;... (2 Replies)
Hi,
So awk is driving me crazy on this one. I have searched everywhere and read man, docs and every related post Google can find and still no luck. The actual files I need to run this on are sensitive in nature, but it is the same thing as if I needed to calculate weighted grades for multiple... (15 Replies)
Discussion started by: cotilloe
15 Replies
LEARN ABOUT OPENDARWIN
auconvert
AUCONVERT(1) General Commands Manual AUCONVERT(1)NAME
auconvert - perform various conversion operations on sound files
SYNOPSIS
auconvert [-file <format>] [-data <format>] [-rate <sample rate>] [-comment <comment>] [-raw <data format> <num tracks>] [-volume <per-
cent>|`max'] [-?] [<input file>] [<output file>]
DESCRIPTION
The auconvert program can be used to convert from one sound file format, and/or data format to another. It can also change the comment,
sampling rate, and volume of a sound file. Finally, auconvert can be used to convert raw audio data into a sound file. If no input file
name is given, standard input will be used. If no output file name is given, the original file will be replaced by the converted file or
standard out will be used if the input is coming from standard input.
OPTIONS
The following options may be used with auconvert:
-file format
The output file format. The -? option will display a list of valid file formats.
-data format
The output data format. The -? option will display a list of valid data formats. Note that each file format may only support
selected data formats.
-rate sample rate
The output sampling rate (in hertz).
-comment comment
The comment to be stored in the output file.
-volume <percent>|`max'
The volume option can be used in two ways. If the argument is a percentage, the output file volume will be converted to the speci-
fied percentage of the input volume. If the argument is the string `max', the output file volume will be converted to its maximum
level.
-raw <data format> <num tracks>
This option is used to convert raw audio data into a sound file. <data format> is the data format of the raw data. <num tracks>
specifies the number of tracks in the raw data. You must also use the -file and -rate options when converting raw data.
-? Displays a usage message and a list of supported file and data formats.
SEE ALSO nas(1), auedit(1)COPYRIGHT
Copyright 1993, 1994 Network Computing Devices, Inc.
AUTHOR
Greg Renda, Network Computing Devices, Inc.
1.9.3 AUCONVERT(1)