Sponsored Content
Top Forums Shell Programming and Scripting Get line of textfile and store it in variable Post 302403927 by murugaperumal on Monday 15th of March 2010 06:31:03 AM
Old 03-15-2010
Code:
my $str="BlaBlaBla Bla2Bla2Bla2 *pPointerOne;";
  if($str=~/[a-z0-9]+\s+\*([a-z A-Z]+)\;/)
  {
      print $1;
  }

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Read and store each line of a file to a variable

Hi all, I'm quite new to unix and hope that someone can help me on this. I'm using csh. Below is what i intend to do. 1. I stored some data in a file. 2. I intend to read the file line by line and store each line of data into a variable, so that i can used it later. Anyone have any... (4 Replies)
Discussion started by: seijihiko
4 Replies

2. Shell Programming and Scripting

store the first line of a file in a variable

i have to store the files in a folder and assign a variable to the the files. (0 Replies)
Discussion started by: dineshr85
0 Replies

3. Shell Programming and Scripting

ksh: How to store each output line into a different variable?

Example output: /tmp/generatelines.sh line1 line2 line3 line4 I want each output line assigned to its own variable, ie: "line1" --> $a "line2" --> $b "line3" --> $c "line4" --> $d Is this possible without writing to a temporary file? Thanks (4 Replies)
Discussion started by: ksheller
4 Replies

4. Shell Programming and Scripting

Capturing a number at the end of line and store it as variable

Hello, Would someone guide me on how to write a shell script the would search for a phone no using at the end text file using sed or awk and store it in a varaible or print it. The text file is in this form text or numbers in first line text or numbers in second line . . . Firsname... (6 Replies)
Discussion started by: amuthiga
6 Replies

5. Shell Programming and Scripting

cut a string in a textfile line per line

i need to cut the string in a textfile but each line has a specific way of cutting it (different lengths) i have a for loop that gets the string line per line, then each line has to be compared: for x in `cat tmp2.txt`; do if; then echo 'BAC' elif ... (6 Replies)
Discussion started by: izuma
6 Replies

6. Shell Programming and Scripting

How to extract more than 1 line in a textfile ?

Hi, I'm starting a little project with a shell script but I'm don't know how to do it. Maybe someone can help me. I have un text file like this : I'd like to do a script who will extract from my file from @ADDLINE1@ to @ADDLINE4@ only and I have no idea how to do this. Any idea ? ... (7 Replies)
Discussion started by: Poulki
7 Replies

7. Shell Programming and Scripting

How to read a file line by line and store it in a variable to execute a program ?

Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files. all my parameters files are in the same directory, so pick them up with ls *.para >>dirafter that I have a dir file like that: param1.para param2.para etc... I... (2 Replies)
Discussion started by: shadok
2 Replies

8. Shell Programming and Scripting

How to separate sorte different characters from one textfile and copy them in a new textfile?

My first post, so don't kill me :) Say i open some textfile with some example like this. on the table are handy, bread and wine Now i know exactly what is in and i want to separate and sorted it in terminal to an existing file with another 2 existing lines in like this: table plane ... (3 Replies)
Discussion started by: schwatter
3 Replies

9. Shell Programming and Scripting

Bash to match and store line as variable

The bash below loops through a specific directory dir and finds and writes the oldest folder to a variable called $filename. #!/bin/bash # oldest folder stored as variable for analysis, version log created, and quality indicators matched to run dir=/home/cmccabe/Desktop/NGS/test find... (2 Replies)
Discussion started by: cmccabe
2 Replies

10. Shell Programming and Scripting

Help with taking variable of for loop in textfile

Hi, I am new to unix/linux scripting. I have a text file, listlib.txt where the content: lib1_23 lib34_a ab_li_lab I need to generate a file (.log) of each cell. I am planning to create a (.csh) script that will have for loop with variable taken from listlib.txt. As for now, i have no... (4 Replies)
Discussion started by: mmaz
4 Replies
SF2TEXT(1)							   AWE32 manual 							SF2TEXT(1)

NAME
SF2TEXT - program to convert SBK or SF2 (SoundFont) files to text format SYNOPSIS
sf2text SoundFont [outputfile] txt2sfx [-Bv] [-m mode] [-d sf2file] textfile sfxfile sfxtext sfxfile gus2sfx [-Bv] [-m mode] [-d sf2file] textfile sfxfile DESCRIPTION
This manual page documents briefly the sf2text , txt2sfx , sfxtext , and gus2sfx commands. This manual page was written for the Debian GNU/Linux distribution (but may be used by others), because the original program does not have a manual page. All these programs are used for converting from various common patch file formats (SoundFont and GUS) into a proprietary format used by older versions of the AWE32 driver. Although newer versions of the driver and utilities are still compatible with these formats, these for- mats do not support multiple layer voices, and in general, you should use sfxload(1), and gusload(1) to load SoundFonts or GUS patches directly. sf2text is a program which converts SoundFont (.SBK and .SF2) files into an intermediate text format used by txt2sfx. txt2sfx is a program which converts the text format output by sf2text into a binary format "sfx" file. This file can be read by sfxload(1). sfx- text takes an "sfx" file, and converts it back to the text format. gus2sfx is a program which converts from GUS-format patch files into the sfx format handled by OPTIONS
The programs follow the usual UNIX command line syntax, but don't support long options (ones starting with two dashes `-'). sf2text, and sfxtext do not support any options. txt2sfx and gus2sfx support the following options: -B Adds a 48-byte blank loop to the end of each sample. -v Increases the verbosity level. Using this option more than once causes the output to become increasingly verbose. -m mode Sets the instrument usage mode when multiple definitions are found for the same instrument (multi-layered instruments): 0 means to use the first found, 1 means to use the last, and 2 means to merge them. -d sf2file Includes raw sample data found in the SoundFont file sf2file SEE ALSO
sfxload(1), gusload(1) AUTHOR
This manual page was written by Tom Lees <tom@lpsg.demon.co.uk>, for the Debian GNU/Linux system. The AWE32 driver and utilities were written by Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>. awesfx 0.3.3 Sun Mar 2 10:13:22 GMT 1997 SF2TEXT(1)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy