Sponsored Content
Top Forums Shell Programming and Scripting how to make ABC into "ABC" ina file Post 302139431 by radoulov on Saturday 6th of October 2007 03:09:18 PM
Old 10-06-2007
Code:
sed 's/[^ ]*/"&"/g' filename

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get the output from [ -s "abc.txt" ]

Hi, I am trying to check the file not empty, if its not empty then i try to send other system by ftp, the following codes doesnt work if ] then echo "File ${OUTBOUNDFILE} have data" ftp -i -n -v 204.104.22.33 >> ${FTP_LOGFILE} << EOF user abc def ascii put ${OUTBOUNDFILE} quit EOF... (1 Reply)
Discussion started by: Imran_Chennai
1 Replies

2. UNIX for Dummies Questions & Answers

echo "ABC" > file1.txt file2.txt file3.txt

Hi Guru's, I need to create 3 files with the contents "ABC" using single command. Iam using: echo "ABC" > file1.txt file2.txt file3.txt the above command is not working. pls help me... With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies

3. Linux

Regular expression to extract "y" from "abc/x.y.z" .... i need regular expression

Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
2 Replies

4. Shell Programming and Scripting

In ksh shell command - Print "-ABC" is giving error

Hi Guys, while executing the following command : print "-ABC" is giving following error : ksh: print: bad option(s) I cannot use echo for some other reasons, so any other option ? (2 Replies)
Discussion started by: sagarjani
2 Replies

5. Shell Programming and Scripting

What is difference between ./abc.sh and . abc.sh

Hi Friends I have one shell script abc.sh If I run it ./abc.sh and . abc.sh , then what is the difference.. Thanks Joy:confused: (1 Reply)
Discussion started by: itsjoy2u
1 Replies

6. Shell Programming and Scripting

How can I use if statement to check a string start with "abc"

I am trying to write a if statement in KSH that if a string is start with abc then print something, I have written some code as below but it doesn't work. Could someone please help me if ] then print success fi (5 Replies)
Discussion started by: yhever
5 Replies

7. Shell Programming and Scripting

del the line before the "abc"line and after it

$file1 haha hello i'm lei i'm abc you are right yes it is I want to get file2 haha i'm abc yes it is del line before and after the line contains abc I want to know the two steps 1,del the line before line "abc' ,2 del the line after the "abc question 2 (4 Replies)
Discussion started by: yanglei_fage
4 Replies

8. Shell Programming and Scripting

Make scipt except from "Y","y" and "yes" to take [Enter] as being "yes"

This is the script: #!/bin/sh if ; then rm -rf /usr/share/WallpaperChanger; fi if ; then rm -rf /usr/bin/wallch; fi; if ; then rm -rf /usr/share/applications/wallch.desktop; fi if ; then rm -rf /usr/share/doc/wallch; fi if ; then rm -rf /usr/share/man/man1/wallch.1.gz; fi echo "Delete... (4 Replies)
Discussion started by: hakermania
4 Replies

9. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

10. UNIX for Beginners Questions & Answers

Echo "abc" | sed - r 's/a/&_&/

I want to know the working of & here step by step using sed command. (1 Reply)
Discussion started by: Preeti07
1 Replies
ABCMATCH(1)						      General Commands Manual						       ABCMATCH(1)

NAME
abcmatch - search sequences of notes in an ABC file SYNOPSIS
abcmatch data-file [number] [-a] [-br d] [-c] [-con] [-ign] [-length_hist] [-pitch_hist] [-qnt] [-r n] [-v] [-ver] DESCRIPTION
abcmatch searches an ABC file containing (potentially) many tunes for specific sequences of notes. For example, if you know a few bars of a tune, you can use this program to find the tune having this sequence and perhaps identify the tune. At a minimum, abcmatch requires two files. A template file called match.abc which contains the bars that you are searching for and a large file consisting of a hundred or more ABC tunes. The program automatically loads up the match.abc file and then scans every tune in the large file. Though the program can be run stand-alone, it is really meant to be run with a GUI such as runabc.tcl (which is not yet part of Debian). Most of its output is rather cryptic. THE MATCHING PROCESS
The template file must be a well-formed ABC file containing the basic X:, M:, L:, and K: headers as well as the bars to be matched. (Nor- mally, this file is created by runabc.tcl.) It is important to finish each bar in the match file with a vertical line. abcmatch uses the key signature to figure out the relative position of the notes in the scale, and to determine all the assumed sharps and flats. Therefore the program can find matching bars in a tune that has been transposed to another key, as long as the key difference is not too large. Matches are output in a list format looking like 29 30 4 30 31 4 Each line indicates a particular match found by the program. The first number on each line gives the relative position of the tune in the data-file, while the next number gives the X: number of that tune. The last number is the bar number of the matching tune. Bar numbers are counted sequentially from the start of the tune, and all V: and P: indications are ignored. That is, the bar number returned by abcmatch may not match bar numbers printed by one of the PostScript-producing ABC processors such as abcm2ps or abcmidi-yaps. For the purposes of matching, abcmatch ignores all guitar chords, lyrics, note decorations (e.g., staccato markings), grace notes, etc. In chords such as [G2c2], only the highest note is considered. Any warnings or error messages from the ABC parser are suppressed unless the -c option is given. OPTIONS
-a Report any matching bars. By default, if the template file contains a sequence of several bars, the program will try to find places in the data file where the whole sequence matches. With this option, it returns all places in the data file where any of the bars in the template file match. -br d `Brief mode' is designed to identify groups of tunes sharing common bars. In this mode, the program determines the number of all bars in each tune from the data file which are also present in the template file. If the number of common bars is greater than or equal to the value of the d parameter, the program reports the tune and the number of common bars. Currently there is no user con- trol of the matching criterion; the rhythm must match exactly, and the notes are transposed to suit the key signature. -c Display error and warning messages from the ABC parser (which are suppressed by default). -con Do a pitch contour match. In this case, the program uses the key signature only to indicate accidentals. The pitch contour is com- puted from the pitch difference (interval) between adjacent notes. That is, C2 DE, c2 de, and G2 AB all have the same pitch contour. -ign Ignore simple bars. -length_hist This does no matching at all but returns a histogram of the distribution of note lengths in the data file. The output looks like length histogram 12 100 24 20 36 6 48 2 72 4 where a quarter note is 24 units, an eight note 12 units, a dotted half note 72 units etc. -pitch_hist This does no matching at all but returns a histogram of the distribution of pitches in the data file. The output looks like pitch histogram 64 2 66 9 67 11 where the first number on each line is a MIDI note number and the second is a count of the number of times that note occurred. -qnt Do a quantized pitch contour match. This works as described above for the -con option, but will also quantize the intervals as fol- lows: Unison and semitone intervals are assigned value 0, major 2nds to major 3rds value 1, and a perfect 4th or greater value 2. Negative numbers are used for descending intervals. -r n Resolution for matching. If the n parameter is zero, a perfect match must be found, meaning that the lengths of each note in a bar must match exactly in order to be reported. The larger the value of n, the looser the match will be. Note lengths are converted into temporal units where a quarter note is normally assigned a value of 24 (therefore an eighth note has a value of 12, a sixteenth a value of 6, a half note a value of 48 etc.) If you specify a temporal resolution of 12, then the pitch values of the notes only need to match at the time units that are multiples of an eight note. This means that the program would match the two bars C2 D2 and C C D D, as well as C2 D2 and C/D/C/D/D2. By selecting a suitable value for n, you can search for matches only at the beginning of a mea- sure or at the beginning of each beat. -v Run verbosely. -ver Display the program's version number. LIMITATIONS
The program has some limitations. For example, the data file must contain bar lines, and tied notes cannot be longer than the equivalent of 8 quarter notes. A resolution (-r option) that is too small may cause some buffers to be exceeded. When there are differences of key signa- tures of more than 5 semitones, the program may transpose the notes in the wrong direction. Also, tunes with more than one key signature or time signature may not be processed correctly. SEE ALSO
abc2midi(1), midi2abc(1), mftext(1) AUTHOR
This manual page was written by Anselm Lingnau <lingnau@debian.org> for the GNU/Linux system. VERSION
This manual page describes abcmatch version 1.42 as of 21 December 2006. 24 August 2007 ABCMATCH(1)
All times are GMT -4. The time now is 05:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy