08-07-2013
Please post a sample of the input and desired output...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Can anyone plz share their experience with -
Building shell script to append the file with date in following format-
Filename_MMDDYYYY.txt
Thanks in advance (2 Replies)
Discussion started by: prince_of_focus
2 Replies
2. UNIX for Dummies Questions & Answers
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. UNIX for Dummies Questions & Answers
Hi,
I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes..
i wanna attach a text file and send to a mail id..used the following code :
uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com
it works... (2 Replies)
Discussion started by: ash22
2 Replies
4. Shell Programming and Scripting
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
Discussion started by: mdap
1 Replies
5. Shell Programming and Scripting
Hi expersts,
in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log
I want list only .txt and .TXT files in one command...
how to ??
//purple (1 Reply)
Discussion started by: thepurple
1 Replies
6. Shell Programming and Scripting
This is appending a column.
My question is fairly simple. I have a program generating data in a form like so:
1 20
2 22
3 23
4 12
5 43
For ever iteration I'm generating this data. I have the basic idea with cut -f 2 fileA.txt | paste -d >> FileB.txt ???? I want FileB.txt to grow, and... (4 Replies)
Discussion started by: theawknewbie
4 Replies
7. Shell Programming and Scripting
Dear all,
I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script.
Any help is greatly appreciated.
Greetings,
emily
DATA.txt (snippet of the huge text file)
407202849... (2 Replies)
Discussion started by: emily
2 Replies
8. UNIX for Dummies Questions & Answers
Hi All
Is there a way to export every line into new txt file where by the title of each txt output are same as the line ?
I have this txt files containing names:
Kandra Vanhooser
Rhona Menefee
Reynaldo Hutt
Houston Rafferty
Charmaine Lord
Albertine Poucher
Juana Maes
Mitch Lobel... (2 Replies)
Discussion started by: Nexeu
2 Replies
9. Shell Programming and Scripting
i would like to insert a line from 2.txt into 1.txt between " and "
or a way of adding to the end of each line " _01_ and have the numbers
correspond to the line #
1.txt=
foofoo "" _01_
foofoo "" _02_
foofoo "" _03_
foofoo "" _04_
2.txt= ... (6 Replies)
Discussion started by: klein
6 Replies
10. Programming
Hello everyone,
Since my python knowledge is limimted, I've challenged myself to learn as much as possible to help me with my carrere. I'm currently trying to convert a shell script to python, just to give myself a task. There is one section of the script that I'm having issues converting and... (2 Replies)
Discussion started by: da1
2 Replies
GSM(3) Library Functions Manual GSM(3)
NAME
gsm_create, gsm_destroy, gsm_encode, gsm_decode -- GSM 06.10 lossy sound compression
SYNOPSIS
#include "gsm.h"
gsm gsm_create();
void gsm_encode(handle, src, dst)
gsm handle;
gsm_signal src[160];
gsm_frame dst;
int gsm_decode(handle, src, dst)
gsm handle;
gsm_frame src;
gsm_signal dst[160];
void gsm_destroy(handle)
gsm handle;
DESCRIPTION
Gsm is an implementation of the final draft GSM 06.10 standard for full-rate speech transcoding.
gsm_create() initializes a gsm pass and returns a 'gsm' object which can be used as a handle in subsequent calls to gsm_decode(),
gsm_encode() or gsm_destroy().
gsm_encode() encodes an array of 160 13-bit samples (given as gsm_signal's, signed integral values of at least 16 bits) into a gsm_frame of
33 bytes. (gsm_frame is a type defined as an array of 33 gsm_bytes in gsm.h.)
gsm_decode() decodes a gsm_frame into an array of 160 13-bit samples (given as gsm_signals), which sound rather like what you handed to
gsm_encode() on the other side of the wire.
gsm_destroy() finishes a gsm pass and frees all storage associated with it.
Sample format
The following scaling is assumed for input to the algorithm:
0 1 11 12
S..v..v..v..v..v..v..v..v..v..v..v..v..*..*..*
Only the top 13 bits are used as a signed input value.
The output of gsm_decode() has the three lower bits set to zero.
RETURN VALUE
gsm_create() returns an opaque handle object of type gsm, or 0 on error. gsm_decode() returns -1 if the passed frame is invalid, else 0.
EXAMPLE
#include "gsm.h"
gsm handle;
gsm_frame buf;
gsm_signal sample[160];
int cc, soundfd;
play() { /* read compressed data from standard input, write to soundfd */
if (!(handle = gsm_create())) error...
while (cc = read(0, (char *)buf, sizeof buf)) {
if (cc != sizeof buf) error...
if (gsm_decode(handle, buf, sample) < 0) error...
if (write(soundfd, sample, sizeof sample) != sizeof sample)
error...
}
gsm_destroy(handle);
}
record() { /* read from soundfd, write compressed to standard output */
if (!(handle = gsm_create())) error...
while (cc = read(soundfd, sample, sizeof sample)) {
if (cc != sizeof sample) error...
gsm_encode(handle, sample, buf);
if (write(1, (char *)buf, sizeof buf) != sizeof sample)
error...
}
gsm_destroy(handle);
}
BUGS
Please direct bug reports to jutta@cs.tu-berlin.de and cabo@cs.tu-berlin.de.
SEE ALSO
toast(1), gsm_print(3), gsm_explode(3), gsm_option(3)
GSM(3)