Sponsored Content
Top Forums Shell Programming and Scripting Using sed to insert text file at first line Post 302508603 by ctsgnb on Monday 28th of March 2011 01:53:20 PM
Old 03-28-2011
@Bartus

LOL , you geek Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SED- Insert text at top of file

Does anyone know how to insert text at the top and bottom of a file using sed? (12 Replies)
Discussion started by: MBGPS
12 Replies

2. Shell Programming and Scripting

Insert text file at a certain line.

I need to insert a file called temp_impact (which has about 15 lines in it) to a file called 11.23cfg starting at line 33. I searched the forums and found the sed '34i\ test' 11.23cfg > newfile That will enter word test at the appropriate line, but i need the entire file dumped there. Any... (4 Replies)
Discussion started by: insania
4 Replies

3. Shell Programming and Scripting

How to insert some constant text at beginig of each line within a text file.

Dear Folks :), I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp. I can do this in vi editor by using this command :g/^/s//BBB_ e,g I have a file named as Test.dat and it containins below text: michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies

4. Shell Programming and Scripting

Need to insert new text and change existing text in a file using SED

Hi all, I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output. sed '$a\ hi... ' shell > shell1 But I face problem when using the same in script. It is throwing the error as, sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies

5. Shell Programming and Scripting

sed insert text at particular line

I know that sed -n '12p' file will print line 12 but how might I insert text to a specified line? thanks (2 Replies)
Discussion started by: action_owl
2 Replies

6. Shell Programming and Scripting

Insert text file only after the first match with SED

Hello, I'm new in Shell scripting but i should write a script, which inserts the license header out of a txt-File into the files in our Projekt. For the Java classes it runs without Problems but for XML files not. At xml-files i have to put the license Header after the xml-Header (?xml... (1 Reply)
Discussion started by: PhoenixONE
1 Replies

7. Shell Programming and Scripting

Sed insert text at first line of empty file

I can't seem to get sed to allow me to insert text in the first line of an empty file. I have a file.txt that is a 0 byte file. I want sed to insert " fooBar" onto the first line. I've tried a few options and nothing seems to work. They work just fine if there's text in the file tho. Help? (4 Replies)
Discussion started by: DC Slick
4 Replies

8. UNIX for Dummies Questions & Answers

Insert a line in a text file

I want to insert a line with text after the 9th line of a text file. How would I do this using sed or awk? (2 Replies)
Discussion started by: lost.identity
2 Replies

9. Shell Programming and Scripting

How to read a text file line by line and insert into a database table?

I have a test file that I want to read and insert only certain lines into the the table based on a filter. 1. Rread the log file 12 Hours back Getdate() -12 Hours 2. Extract the following information on for lines that say "DUMP is complete" A. Date B. Database Name C.... (2 Replies)
Discussion started by: JolietJake
2 Replies

10. UNIX for Beginners Questions & Answers

Insert a line of text on nth line of a file

Hi All, I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise My intention is to insert a line of text after 13th line of every file inside a particular directory. While trying to do it for a single file , i am using sed sed '3 i this is the 4th line' filename sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
COMPOSITE_SAMPLER(1)						   Audio Plugins					      COMPOSITE_SAMPLER(1)

NAME
composite_sampler - audio sampler/synth plugin (LV2) DESCRIPTION
The Composite sampler is an audio plugin (LV2) that provides a simple sampling engine. It is identified by the URI "http://gabe.is-a-geek.org/composite/plugins/sampler/1" PORTS
The sampler includes the following ports: +-------+-----------+-------------+--------+-------------------------+ |Name | LV2 Port | Type | Flow | Description | +-------+-----------+-------------+--------+-------------------------+ |Left | out_left | AudioPort | Output | Left stereo channel | | | | | | output | +-------+-----------+-------------+--------+-------------------------+ |Right | out_right | AudioPort | Output | Right stereo channel | | | | | | output | +-------+-----------+-------------+--------+-------------------------+ |MIDI | midi | EventPort | Input | Main MIDI Input | +-------+-----------+-------------+--------+-------------------------+ |Volume | volume | ControlPort | Input | Master volume [0.0-1.0] | +-------+-----------+-------------+--------+-------------------------+ CONTROLLING THE SAMPLER
The primary way to control the sampler is over MIDI. See composite_midi(7) for complete documentation on the MIDI implementation. DRUMKITS
The drumkits for Composite are the same as for Hydrogen. To reuse your Hydrogen drumkits, copy or symlink them to $HOME/.composite/data/drumkits/. You can create and edit drumkits with composite-gui (or Hydrogen). PRESETS
The sampler responds to MIDI Program Change events. Based on the event that it receives, it will load up another file (e.g. a drumkit). This is how you can select the drumkit that you wish to use. The presets are defined in a file $HOME/.composite/data/presets/default.xml. For the sampler plugin, you can override this by using default-presets.xml, but at the current time there is no need to. When you first load the sampler, it will check for this file. If it doesn't exist, it will create one based on all your user drumkits. The presets file is a simple XML file that allows you to define MIDI banks, and assign different resources for each program change. An example file is as follows: <?xml version="1.0"?> <T:tritium xmlns:T="http://gabe.is-a-geek.org/tritium/xml/1/"> <T:presets> <T:bank coarse="0" fine="0"> <T:program> <T:midi_number>0</T:midi_number> <T:resource>tritium:drumkits/GMkit</T:resource> </T:program> <T:program> <T:midi_number>1</T:midi_number> <T:resource>tritium:drumkits/TR808EmulationKit</T:resource> </T:program> </T:bank> </T:presets> </T:tritium> You can define several <bank> elements for the MIDI banks. The attributes coarse and fine correspond to the MIDI CC's 0 and 32. Each <program> section is a preset. The <midi_number> corresponds to the number in the PC message. The <resource> element holds a URI/URL to the thing you want loaded. This will typically be a drum kit, but can be any kind of file that Composite supports (like a .h2song, .h2pattern, etc.). The sampler will do the Right Thing. (For example, when loading an .h2song, the drumkit stored in the song will be loaded.) The URL's supported are file://, tritium:, and file names. The tritium: scheme is designed to create portable URL's to things like drum kits. For example, the URL "tritium:drumkits/GMkit" will load the drumkit "GMkit", whether it's installed in the user directory ($HOME/.composite/data/drumkits/GMkit/drumkit.xml) or in the system directory (/usr/share/composite/data/drumkits/GMkit/drumkit.xml). Note The XML namespace declaration "http://gabe.is-a-geek.org/tritium/xml/1/" is not optional. LV2 EXTENSIONS This plugin uses the following extensions, and they must be supported by any program (host) that wishes to use this plugin. If the host does not support them, the plugin will fail to load. o Events <http://lv2plug.in/ns/ext/event#> o Midi Events <http://lv2plug.in/ns/ext/midi#MidiEvent> FILES
/usr/share/composite/data/ -- This is the main folder where system data (drumkits, presets, etc.) are stored for Composite and Composite Sampler. $HOME/.composite/data/ -- This is the main folder where user data (drumkits, presets, etc.) are stored for Composite and Composite Sampler. $HOME/.composite/data/drumkits/ -- This is the main folder where user drumkits are stored. Each drumkit has its own folder, and each folder has a file 'drumkit.xml' that describes the drumkit. $HOME/.composite/data/presets/default.xml -- This is the default presets file for Composite. If it does not exist, it will be created automatically using all of your installed drumkits. $HOME/.composite/data/presets/default.xml -- This is the default presets file for Composite. If it does not exist, it will be created automatically using all of your installed drumkits. $HOME/.composite/data/presets/default-plugin.xml -- This is the default presets file for the Composite Sampler. If it does not exist, then $HOME/.composite/data/presets/default.xml is used. KNOWN BUGS
Loading a .h2song through the presets is not happening in a real-time safe manner. Loading drumkits works fine. SEE ALSO
composite_midi(7), lv2_jack_host(1) AUTHOR
Gabriel M. Beddingfield <gabriel@teuton.org> Composite 03/18/2010 COMPOSITE_SAMPLER(1)
All times are GMT -4. The time now is 08:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy