Sponsored Content
Top Forums Shell Programming and Scripting Delete original wav file if lame was successful encoding. Post 302216427 by Aia on Friday 18th of July 2008 10:51:17 PM
Old 07-18-2008
Delete original wav file if lame was successful encoding.

In a bash script:

Code:
src=”cooltrack.wav”
dst=”cooltrack.mp3”

lame $src $dst

I would like to add some line that would delete the source wav file like:
Code:
rm $src

but I would like this only if the encoding was successful.
What should I include before deleting the original to check that the encoding with lame went alright?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to delete previous line after successful seearch

i have a file in following pattreen A: Size = 10 B: Size = 0 C: Size = 220 D: Size = 0 i want to Display only Charecters which have which have Size = 0 The Out put Should be B: D: Can Some one Help (7 Replies)
Discussion started by: pbsrinivas
7 Replies

2. UNIX for Advanced & Expert Users

delete line from file if successful partial string found

Id like to delete a line from a file using (preferably a single line unix command) if it contains a certain string pattern. If line contains "abcdef" then delete that line. Help greatly appreciated. (7 Replies)
Discussion started by: cronjob78
7 Replies

3. Ubuntu

Playing wav-file sounds.

I would like to be able to shell out to the command line and play sounds. After installing "sox" I can now do this using the play command. Is there a way to stop the playing once it starts? (5 Replies)
Discussion started by: newyorkpaulie
5 Replies

4. Shell Programming and Scripting

Decompress (with gunzip) recursively, but do not delete original gz file

Hi all, I have a folder hierarchy with many gz files in them. I would like to recursively decompress them, but keep the original files. I would also like to move all the decompressed files (these are very large HDF5 files with .CP12 extension) to another data folder. Currently I am using four... (3 Replies)
Discussion started by: gansvv
3 Replies

5. Shell Programming and Scripting

Delete File Only If Successful Transfer..

Hi. I have this shell script for ftp.. ftp -n 12.34.5.67 << EOF user username password cd LOCAL/inbox bin get JAN_Total.gz # del JAN_Total.gz EOF how do i modify the commented part i.e. del JAN_Total.gz only if that JAN_Total.gz has been successfully transfered to the local... (8 Replies)
Discussion started by: aimy
8 Replies

6. Shell Programming and Scripting

How to find the file encoding and updating the file encoding?

Hi, I am beginner to Unix. My requirement is to validate the encoding used in the incoming file(csv,txt).If it is encoded with UTF-8 format,then the file should remain as such otherwise i need to chnage the encoding to UTF-8. Please advice me how to proceed on this. (7 Replies)
Discussion started by: cnraja
7 Replies

7. Shell Programming and Scripting

How to delete a duplicate line and original with sed.

I am completely new to shell scripting but have been assigned the task of creating several batch files to manipulate data. My final task requires me to find lines that have duplicates present then delete not only the duplicate but the original as well. The script will be used in a windows... (9 Replies)
Discussion started by: chino_1
9 Replies

8. UNIX for Dummies Questions & Answers

How to delete original files after using a tar operation.

I have a list of log files in a directory. Once i tar them I need to remove the original log files. How do i do it? (4 Replies)
Discussion started by: manutd
4 Replies

9. UNIX Desktop Questions & Answers

how to create empty wav file

Dear All, Kindly explain me a command in unix to create a empty wav file with example. Thanks in Advance! (1 Reply)
Discussion started by: thillai_selvan
1 Replies

10. Solaris

View file encoding then change encoding.

Hi all!! I´m using command file -i myfile.xml to validate XML file encoding, but it is just saying regular file . I´m expecting / looking an output as UTF8 or ANSI / ASCII Is there command to display the files encoding? Thank you! (2 Replies)
Discussion started by: mrreds
2 Replies
mlib_SignalEmphasize_S16_S16_Sat(3MLIB) 		    mediaLib Library Functions			   mlib_SignalEmphasize_S16_S16_Sat(3MLIB)

NAME
mlib_SignalEmphasize_S16_S16_Sat, mlib_SignalEmphasize_S16S_S16S_Sat, mlib_SignalEmphasize_F32_F32, mlib_SignalEmphasize_F32S_F32S - signal pre-emphasizing SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalEmphasize_S16_S16_Sat(mlib_s16 *dst, const mlib_s16 *src, void *filter, mlib_s32 n); mlib_status mlib_SignalEmphasize_S16S_S16S_Sat(mlib_s16 *dst, const mlib_s16 *src, void *filter, mlib_s32 n); mlib_status mlib_SignalEmphasize_F32_F32(mlib_f32 *dst, const mlib_f32 *src, void *filter, mlib_s32 n); mlib_status mlib_SignalEmphasize_F32S_F32S(mlib_f32 *dst, const mlib_f32 *src, void *filter, mlib_s32 n); DESCRIPTION
Each of these functions applies the preemphasizer to one signal packet and updates the filter states. For monaural signals, the following equation is used: dst[i] = src[i] - alpha*src[i - 1] where i = 0, 1, ..., (n - 1); src[-1] = 0. For stereo signals, the following equation is used: dst[2*i] = src[2*i] - alpha*src[2*(i - 1)] dst[2*i + 1] = src[2*i + 1] - alpha*src[2*(i - 1) + 1] where i = 0, 1, ..., (n - 1); src[-2] = src[-1] = 0. PARAMETERS
Each of the functions takes the following arguments: dst Destination signal array. src Source signal array. filter Internal filter structure. n Number of samples in the source signal array. RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_SignalEmphasizeFree_S16_S16(3MLIB), mlib_SignalEmphasizeInit_S16_S16(3MLIB), attributes(5) SunOS 5.11 2 Mar 2007 mlib_SignalEmphasize_S16_S16_Sat(3MLIB)
All times are GMT -4. The time now is 03:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy