I wish to perform some additional functions in your current command. I would like to get the key and value pair.
Code:
FS="="
split($i, MTH)
key = MTH[1]
value = MTH[2]
FS="/" # if there is no / separator, can I just check the value?
split($value, MTHCHECK)
oldmth=value[1]
newmth=value[2]
# if the value is null -z just skip the check
if oldmth > "12" print "invalid mth"
if oldmth > "0" && < "13" print "valid mth"
if newmth> "12" print "invalid mth"
if newmth > "0" && < "13" print "valid mth"
How do i incorporate all this into an awk command? I am using bash by the way. Thanks again.
The awk command gives the output as you desire in your first post.
Can you post the exact desired output from the given log file?
Hi,
I need to search for a multiple string pattern(5 key words) in a file(similar to a flat file) ,and i need to store the output in a another file .
In that file we may have mutiple occurrences of the key words.and i need only the unique.
kindly help out.
Thanks,
Mohana Krishnan (2 Replies)
Hey Everybody,
I am having much trouble figuring this out, as I am not really a programmer..:mad:
Datafile.txt
Column0 Column1 Column2
ABC DEF xxxGHI
I am running using WGET on a cronjob to grab a datafile, but I need to cut the first three characters from... (6 Replies)
I have file with multiple columns. Column values for a record may be same.
Now i have to replace a column value(this can be same for the other columns) with new value.
File.txt
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D... (1 Reply)
Search and Replace a string pattern with empty in an xml file in unix:
My xml file would be like this :
<Accounts><Name>Harish</Name><mobile>90844444444444445999 </mobile><TRIG>srcujim-1</TRIG></Accounts><Accounts><Name>Satish</Name><mobile>908999</mobile><TRIG>ettertrtt-1</TRIG></Accounts>
... (1 Reply)
Here Is a problem I am facing with awk.
Query --> I want to search for a string in a file and print next 15 lines below the matched string.
1.We do not have GNU grep so cannot use grep -A or grep -B commands.
2. Instead of passing the search pattern as a string to awk. I want the awk to... (4 Replies)
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Hello folks, I have another doozy. I have two files. The first file has four fields in it. These four fields map to different locations in my second file. What I want to do is read the master file (file 2 - 23 fields) and compare each line against each record in file 1. If I get a match in all four... (4 Replies)
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
LEARN ABOUT DEBIAN
midi2ly
MIDI2LY(1) User Commands MIDI2LY(1)NAME
midi2ly - manual page for midi2ly (LilyPond) 2.14.2
SYNOPSIS
midi2ly [OPTION]... FILE
DESCRIPTION
Convert MIDI to LilyPond input.
OPTIONS -a, --absolute-pitches
print absolute pitches
-d, --duration-quant=DUR
quantise note durations on DUR
-D, --debug
debug printing
-e, --explicit-durations
print explicit durations
-h, --help
show this help and exit
-i, --include-header=FILE
prepend FILE to output
-k, --key=ALT[:MINOR]
set key: ALT=+sharps|-flats; MINOR=1
-o, --output=FILE
write output to FILE
-p, --preview
preview of first 4 bars
-s, --start-quant=DUR
quantise note starts on DUR
-S, --skip
use s instead of r for rests
-t, --allow-tuplet=DUR*NUM/DEN
allow tuplet durations DUR*NUM/DEN
-V, --verbose
be verbose
--version
show version number and exit
-w, --warranty
show warranty and copyright
-x, --text-lyrics
treat every text as a lyric
EXAMPLES
$ midi2ly --key=-2:1 --duration-quant=32 --allow-tuplet=4*2/3 --allow-tuplet=2*4/3 foo.midi
REPORTING BUGS
Report bugs via http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs
SEE ALSO
The full documentation for midi2ly is maintained as a Texinfo manual. If the info and midi2ly programs are properly installed at your
site, the command
info midi2ly
should give you access to the complete manual.
midi2ly (LilyPond) 2.14.2 February 2013 MIDI2LY(1)