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
xcfa(1) 							   Manual: Xcfa 							   xcfa(1)

NAME
xcfa - GTK+ Implementation of the GNU shell command. SYNOPSIS
xcfa [OPTION]... [FILE]... -h, -help Displays this help section and exits. -version Displays the version of the program and exits. -verbose Activate verbose mode -systray Activate systray mode DESCRIPTION Interface contains console tools (cdparanoia, lame, oggenc, ...). Allows extraction of audio from DVD to .wav format. Allows extracting audio from CD to formats such as: wav, mp3, flac, ogg, m4a, mpc, ape. Allows encoding audio to: wav, mp3, flac, ogg, m4a mpc, ape. Allows encoding the .wma format to: wav, mp3, flac, ogg, m4a mpc, ape. Allows cutting of files. Allows management of common file-types before converting. Allows management of bitrates, frequencies, and channels. Allows creation of CD covers. Developed with Gtk2 and Glade and runs under the X window system on the GNU platform. USAGE
After the first launch, go to the Options tab and modify the settings to your liking. ADDING THE GPG KEY
With sudo: $ wget http://download.tuxfamily.org/xcfaudio/download/xcfaudio.key.asc -O - | sudo apt-key add - Without sudo: $ su root [Enter the password for root.] # wget http://download.tuxfamily.org/xcfaudio/download/xcfaudio.key.asc -O - | apt-key add - Another solution with root: # gpg --keyserver subkeys.pgp.net --recv 00B21603DD5C7A79 # gpg --export --armor 00B21603DD5C7A79 | sudo apt-key add - SOURCES.LIST Add the following lines to your [ /etc/apt/sources.list ] file for automatic updates: ## Xcfa for i386 and amd64 deb http://download.tuxfamily.org/xcfaudio/xcfa dev contrib deb-src http://download.tuxfamily.org/xcfaudio/xcfa dev contrib COMPLEMENTARY PACKAGE INSTALLATION
: See the Recovery and Complementary package installation guide: http://www.xcfa.tuxfamily.org/index.php?static2/xcfa CHANGELOG
Read the ChangeLog file and view the source code. AUTHOR
XCFA is developed by Claude Bulin (xcfa@tuxfamily.org) 4.3.1 Wed, 23 May 2012 xcfa(1)
All times are GMT -4. The time now is 02:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy