Sponsored Content
Top Forums Shell Programming and Scripting Using like operator in awk if condition Post 302975971 by RudiC on Wednesday 22nd of June 2016 03:13:49 AM
Old 06-22-2016
Not supplying input not desired output samples unnecessarily complicates understanding of your problem and may result in non-working proposals as adequate test cases are missing. Plus: not describing the error (or misbehaviour) doesn't help either as it opens up a wide field for guesswork. So - help us helping you and provide samples!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

OR operator syntax question in AWK script

Hi guys, I confused about syntax used in OR script as follow: I have this sample file separated by "|" containing: January|Month No. 1 February|Month No. 2 March|Month No. 3 April|Month No. 4 May|Month No. 5 June|Month No. 6 July|Month No. 7 August|Month No. 8 September|Month No. 9... (11 Replies)
Discussion started by: cgkmal
11 Replies

2. Shell Programming and Scripting

Awk with or and not operator

awk -F '/' '{ if (($2!="30") print }' f.dat > date_mismatch.dat The above command is giving the desired results But I would want use Or in the above but it is returning the complete file awk -F '/' '{ if ($2!="30"||$2!="31") print }' f.dat > date_mismatch.dat Have tried the... (1 Reply)
Discussion started by: infernalhell
1 Replies

3. Shell Programming and Scripting

HELP with AWK one-liner. Need to employ an If condition inside AWK to check for array variable ?

Hello experts, I'm stuck with this script for three days now. Here's what i need. I need to split a large delimited (,) file into 2 files based on the value present in the last field. Samp: Something.csv bca,adc,asdf,123,12C bca,adc,asdf,123,13C def,adc,asdf,123,12A I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies

4. Shell Programming and Scripting

unary operator expected, if condition test error.

Hi All, I'm assigning a numeric value to variable count=2, well its being assigned by code above the if condition. I want to test for 2 conditions , when $count = 0 or $count <=2 and do something when the condition matches. here is my code, but i run into the infamous : if ] then ... (2 Replies)
Discussion started by: Irishboy24
2 Replies

5. Shell Programming and Scripting

awk Help - Comparison Operator problem

Hi, I've tried searching through the forum but I've drawn a blank so i'm going to post here. I'm developing a number of checks on a CSV file, trying to find if any are greater than a max limit. I'm testing it by running it from a command line. The file I'm testing has 8 records. When I... (3 Replies)
Discussion started by: Tmart
3 Replies

6. UNIX for Dummies Questions & Answers

awk if statement / equals operator

Hi, I was hoping someone could explain this please :) I'm using bash, scientific linux... and I don't know what else you need to know. With awk '{ if( 0.3 == 0.1*3) print $1}' file.dat nothing will be printed since apparently the two numbers do not equate. (Using 0.3 != 0.1*3 is seen... (4 Replies)
Discussion started by: Golpette
4 Replies

7. Shell Programming and Scripting

awk - output comming strange: for operator ~ and == .

Hi awk experts, I am getting a strange output , may be it is normal but I am unable to comprehend, When Using == operator it is showing correct: # ls -l | awk '{for (i=0;i<=NF;i++) if ( $i =="info" )print $1,$6,$7,$8,$9}' drwx------ Jan 17 10:44 info But When using ~ (equal )... (4 Replies)
Discussion started by: rveri
4 Replies

8. Shell Programming and Scripting

Getting syntax error with awk ternary operator

split($7,a," "); date = a; time = a split(date,d,"/"); month = sprintf("%02d",d); day = sprintf("%02d",d); year = 2000 + d % 100 split(time,t,":"); hour=t; min=t hour >= 12? { hour=hour-12; amPm=" PM" } : amPM=" AM" hour == 0? hour=12 time=sprintf("%02d",hour)":"sprintf("%02d",min)amPm ... (4 Replies)
Discussion started by: Michael Stora
4 Replies

9. Shell Programming and Scripting

Plz help me out use OFMT operator in awk programming

Hi While calculating the sum of 6 and 7 fileds it is calculate the wrong value because of floating point like 7898778.10 awk ' BEGIN { FS = OFS = "|" } NR == 1 { next } { UX = $1 OFS $3 OFS $4 OFS $5 p1 +=$6 p2 +=$7 } END { for(i in UX) ... (8 Replies)
Discussion started by: jagu
8 Replies

10. UNIX for Beginners Questions & Answers

If condition on awk

Hi All, Would you guys help me? I have a file that consists of several unstructured fields. in this file I will take the code field and count_berry field. but the position of the count_berry field is always changing.the column for code is always structured, which is found in column 6 I have... (4 Replies)
Discussion started by: kivale
4 Replies
MIXER(1)						  The Canonical Csound Reference						  MIXER(1)

NAME
mixer - Mixes together a number of soundfiles. . DESCRIPTION
Mixes together a number of soundfiles, starting at different times and with individual channel selection from the input files. SYNTAX
mixer [OPTIONS ... ] infile [[OPTIONS... ] infile] ... INITIALIZATION
Flags: o -A = Generate an AIFF output file. o -W = Generate an WAV output file. o -h = Generate an output file with no header. o -c = Generate 8-bit signed_char sound samples. o -a = Generate alaw sound samples. o -u = Generate ulaw sound samples. o -s = Generate short integer sound samples. o -l = Generate long (32 bit) integer sound samples. o -f = Generate floating point samples. o -F arg = Specifies the gain to be applied to the following input file. If arg is a floating point number that gain is applied uniformly to the input. Alternatively it could be a file name which specifies a breakpoint file for varying the gain for different periods. o -S integer = Indicate at which sample to start to mix in the next input file. o -T fpnum = Indicate at which time (in seconds) to start to mix in the next input file. o -1 = Mix in channel 1 from next sound file. o -2 = Mix in channel 2 from next sound file. o -3 = Mix in channel 3 from next sound file. o -4 = Mix in channel 4 from next sound file. o -^ intx inty = Mix in channel x from next sound file as channel y in the output. o -v = Verbose mode. o -R = Continually rewrite the header while writing soundfile (WAV/AIFF). o -H integer = Show a "heart-beat" to indicate progress, in style 1, 2 or 3. o -N = Alert call (usually ringing the bell) when finished. o -o fname = output file name (default: test.wav) EXAMPLES
The default values are mixer -s -otest -F 1.0 -S 0 For example mixer -F 0.96 in1.wav -S 300 -2 in2.aiff -S 300 -^4 1 in3.wav -o out.wav This creates a new sound file with a constant gain of 0.96 from in1.wav with the second channel of in2.aiff mixed in after 300 samples and channel 4 of in3.wav outpout as channel 1 after 300 samples. CREDITS
Author: John ffitch 1994 AUTHORS
Barry Vercoe MIT Media Lab Author. Dan Ellis MIT Media Lab, Cambridge Massachussetts Author. COPYRIGHT
5.10 08/01/2011 MIXER(1)
All times are GMT -4. The time now is 11:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy