10-04-2012
Can you post the test data...with desired output u want
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can I find out what type of processor, and speed, along with memory info such as RAM and storage. Also how do I scrollup on the shell? (2 Replies)
Discussion started by: AllyJones
2 Replies
2. Shell Programming and Scripting
Hi :)
I have some problems with "FOR"...
I have a text file in this format:
name1
www.link1/random_number
name2
www.link2/random_number
name3
www.link3/random_number
...
(Names and info changes)
Now, I need: (4 Replies)
Discussion started by: aspire
4 Replies
3. HP-UX
Hi,
I need to find tcsh shell version info on several boxes.
I made a script and running on boxes through SSH.
This is what i am doing :
echo /bin/tcsh -c 'echo $version' | ssh "box name"
but i dont see anything.
if i run /bin/tcsh -c 'echo $version' on ocal machine i see the... (2 Replies)
Discussion started by: kailash19
2 Replies
4. Red Hat
Hi, I have two questions about Linux with VMware:
(1) How to tell if the system is real or VMware virtual from a Linux platform without root privilege? (root can use 'dmidecode | grep -i vmware). The command 'dmesg | grep -i vmware' run by everyone is not always working for this purpose.
(2)... (2 Replies)
Discussion started by: aixlover
2 Replies
5. Shell Programming and Scripting
Hi all,
I have two .txt file i.e.
First text file:
2
4
1
4
Second text file
2 1.nii.gz
4 334.nii.gz
1 12.nii.gz
4 134.nii.gz
If entry in 1st column of 1st text file matches the 1st column of 2nd text file, then copy the file (name of which is the second column) associated with... (4 Replies)
Discussion started by: vd24
4 Replies
6. Shell Programming and Scripting
Currently i have following syntax:
ldapsearch -D "CN=..,OU=..,OU=All Businesses,DC=..,DC=..,DC=.." -w .. -h .. -p .. -b "OU=All Businesses,DC=..,DC=..,DC=.." "managedObjects=$DL_NAME_CN" employeeNumber givenName sn -S employeeNumber -x
which gives me following info:
"requesting:... (0 Replies)
Discussion started by: arsenghani
0 Replies
7. Shell Programming and Scripting
Hi,
So I'm kinda new to shell scripts and the like. I've picked up quite a bit of use from browsing the forums here but ran into a new one that I can't seem to find an answer for.
I'm looking to parse/find a string AND the next 15 or so charachters that follow the string within a text file... (1 Reply)
Discussion started by: kar23me
1 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have a text file with member information...
B]Name is in H1 tag
Title is in H2 tag
Email is in <a id="ctl00_ContentPlaceHolder3_repeaterItems_ctl01_lbnEmailMe" href="javascript:__doPostBack('ctl00$ContentPlaceHolder3$repeaterItems$ctl01$lbnEmailMe','')">someone@company.com</a>
Location:... (6 Replies)
Discussion started by: igurv
6 Replies
9. Shell Programming and Scripting
Hi,
I am trying to find files that are more than a gig with this command
find . -size +1073741823c and it just gives me the names of the files. How do i get it to give me the actual size of the files too?
---------- Post updated at 09:41 AM ---------- Previous update was at 09:37 AM... (2 Replies)
Discussion started by: LilyClaro
2 Replies
10. UNIX for Beginners Questions & Answers
I'm looking for a way to inventory files on a webserver into a CSV file, and am particularly interested in certain types of files, like .php, .cgi, .pl, .py, .sh, etc. but also want the ability to find all files, including those with no extension, or specified extensions, as above, including files... (1 Reply)
Discussion started by: spacegoose
1 Replies
LEARN ABOUT CENTOS
sdl_convertaudio
SDL_ConvertAudio(3) SDL API Reference SDL_ConvertAudio(3)
NAME
SDL_ConvertAudio - Convert audio data to a desired audio format.
SYNOPSIS
#include "SDL.h"
int SDL_ConvertAudio(SDL_AudioCVT *cvt);
DESCRIPTION
SDL_ConvertAudio takes one parameter, cvt, which was previously initilized. Initilizing a SDL_AudioCVT is a two step process. First of all,
the structure must be passed to SDL_BuildAudioCVT along with source and destination format parameters. Secondly, the cvt->buf and cvt->len
fields must be setup. cvt->buf should point to the audio data and cvt->len should be set to the length of the audio data in bytes. Remem-
ber, the length of the buffer pointed to by buf show be len*len_mult bytes in length.
Once the SDL_AudioCVTstructure is initilized then we can pass it to SDL_ConvertAudio, which will convert the audio data pointer to by
cvt->buf. If SDL_ConvertAudio returned 0 then the conversion was completed successfully, otherwise -1 is returned.
If the conversion completed successfully then the converted audio data can be read from cvt->buf. The amount of valid, converted, audio
data in the buffer is equal to cvt->len*cvt->len_ratio.
EXAMPLES
/* Converting some WAV data to hardware format */
void my_audio_callback(void *userdata, Uint8 *stream, int len);
SDL_AudioSpec *desired, *obtained;
SDL_AudioSpec wav_spec;
SDL_AudioCVT wav_cvt;
Uint32 wav_len;
Uint8 *wav_buf;
int ret;
/* Allocated audio specs */
desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
obtained=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
/* Set desired format */
desired->freq=22050;
desired->format=AUDIO_S16LSB;
desired->samples=8192;
desired->callback=my_audio_callback;
desired->userdata=NULL;
/* Open the audio device */
if ( SDL_OpenAudio(desired, obtained) < 0 ){
fprintf(stderr, "Couldn't open audio: %s
", SDL_GetError());
exit(-1);
}
free(desired);
/* Load the test.wav */
if( SDL_LoadWAV("test.wav", &wav_spec, &wav_buf, &wav_len) == NULL ){
fprintf(stderr, "Could not open test.wav: %s
", SDL_GetError());
SDL_CloseAudio();
free(obtained);
exit(-1);
}
/* Build AudioCVT */
ret = SDL_BuildAudioCVT(&wav_cvt,
wav_spec.format, wav_spec.channels, wav_spec.freq,
obtained->format, obtained->channels, obtained->freq);
/* Check that the convert was built */
if(ret==-1){
fprintf(stderr, "Couldn't build converter!
");
SDL_CloseAudio();
free(obtained);
SDL_FreeWAV(wav_buf);
}
/* Setup for conversion */
wav_cvt.buf=(Uint8 *)malloc(wav_len*wav_cvt.len_mult);
wav_cvt.len=wav_len;
memcpy(wav_cvt.buf, wav_buf, wav_len);
/* We can delete to original WAV data now */
SDL_FreeWAV(wav_buf);
/* And now we're ready to convert */
SDL_ConvertAudio(&wav_cvt);
/* do whatever */
.
.
.
.
SEE ALSO
SDL_BuildAudioCVT, SDL_AudioCVT
SDL
Tue 11 Sep 2001, 22:58 SDL_ConvertAudio(3)