Sponsored Content
Top Forums Shell Programming and Scripting help using find/xargs to apply mp3gain to files Post 302603345 by chihung on Wednesday 29th of February 2012 07:42:44 PM
Old 02-29-2012
To ensure mp3gain process .mp3 files only in those directories that contain mp3 files, the first while loop + sort -u will single out the these directories. The second while loop will then cd into each of the directory to run mp3gain. I use sub-shell to cd to the directory so that I do not have to 'cd ..' back.
Code:
find /media/data/music -type f -name "*.mp3" | 
while read f
do
  echo ${f%/*}
done | sort -u | while read d
do 
  (cd $d && mp3gain -a -k -p *.mp3)
done

 

10 More Discussions You Might Find Interesting

1. Linux

How to find and apply patches in RHAT linux?

Hi: This is an elementary qs. Thanks in advance, (4 Replies)
Discussion started by: bbose
4 Replies

2. Shell Programming and Scripting

Script to find/apply Solaris 10 ACL's

This may be a question for a different forum, but as I will need a script I thought I would start here. We recently migrated from Solaris 8 to Solaris 10. The file system in question here is ZFS, meaning the method for listing and applying ACL's has changed dramatically. To make a long story... (3 Replies)
Discussion started by: Shoeless_Mike
3 Replies

3. UNIX for Dummies Questions & Answers

XARGS and FIND together

I am trying to delete files older than 60 days from a folder: find /myfolder/*.dat -mtime +60 -exec rm {} \; ERROR - argument list too long: find I can't just give the folder name, as there are some files that I don't want to delete. So i need to give with the pattern (*.dat). I can... (3 Replies)
Discussion started by: risshanth
3 Replies

4. Shell Programming and Scripting

find with xargs to rm found files

I believe what is happening is rm is executing in the script on every directory and on failure of the first it stops although returns status 0. find $HOME -name /directory/filename | xargs -l rm This is the code I use but file remains. I am using sun solaris system which has way limited... (4 Replies)
Discussion started by: Ebodee
4 Replies

5. Shell Programming and Scripting

find and xargs

hi, i've been trying to figure this weird error but I cannot seem to know why. I am using below find command: find . \( ! -name . -prune \) -type f -mtime +365 -print The above code returns no file because no files are really more then 365 days old. However, when I use xargs, its... (9 Replies)
Discussion started by: The One
9 Replies

6. Shell Programming and Scripting

Apply 'awk' to all files in a directory or individual files from a command line

Hi All, I am using the awk command to replace ',' by '\t' (tabs) in a csv file. I would like to apply this to all .csv files in a directory and create .txt files with the tabs. How would I do this in a script? I have the following script called "csvtabs": awk 'BEGIN { FS... (4 Replies)
Discussion started by: ScKaSx
4 Replies

7. Shell Programming and Scripting

Xargs + Find Help

Guys i want to run a command to list all directories that havn't been modified in over 548 days ( 1.5 yrs ). Id like to run a script to first print what the command finds ( so i get a list of the files pre move ... i have a script set for this : find /Path/Of\ Target/Directory/ -type d -mtime... (4 Replies)
Discussion started by: modulartention
4 Replies

8. UNIX for Dummies Questions & Answers

find/xargs/*grep: find multi-line empty "try-catch" blocks - eg, missing ; not in a commented block

How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases? This would seem to involve find, xargs, *grep, regex, etc. In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
Discussion started by: lifechamp
0 Replies

9. Shell Programming and Scripting

Help with find, xargs and awk

Hi, I want to find some files and then search for some lines in it with a particular pattern and then write those lines into a file. To do this I am using something like this from command prompt directly. cd /mdat/BVG find -name "stmt.*cl" -newer temp.txt | xargs -i awk '/BVG-/{print}' {} >... (7 Replies)
Discussion started by: Sandhya Harsh
7 Replies

10. Shell Programming and Scripting

Fast processing(mv command) of 1 million+ files using find, mv and xargs

Hi, I'd like to ask if anybody can help improve my code to move 1 million+ files from a directory to another: find /source/dir -name file* -type f | xargs -I '{}' mv {} /destination/dir I learned this line of code from this forum as well and it works fine. However, file movement is kinda... (6 Replies)
Discussion started by: agentgrecko
6 Replies
bluemindo(1)						      General Commands Manual						      bluemindo(1)

NAME
bluemindo - simple yet powerful audio player SYNOPSIS
bluemindo [options] DESCRIPTION
This manual page documents briefly the bluemindo command. bluemindo Bluemindo is a really simple but powerful audio player in Python/PyGTK, using GStreamer. It can downloads albums or artists pic- tures and lyrics as doing desktop notifications or sending music to your Last.fm profile or on your Jabber account (via PEP). You can also choose the view mode: lightweight (very simple way to use the player: you only have a playlist), basic (you have a tree of artists>albums and a playlist), normal (the most usual mode for audio players), full (you have a list of artists and saved playlists, a list of albums covers by artists and the playlist) or albums. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. -h, --help Show summary of options. --current Show the current playing song artist, title and album. --current-cover Show the path to the album cover of the current playing song. --current-lyrics Show the lyrics for the current playing song. --playpause, --play, --pause Play or pause the song. --stop Stop the song. --previous Jump to the previous song in playlist. --next Jump to the next song in playlist. --volume-more [ STEP ] Increase the volume, you can specify a step (0 > 100). --volume-less [ STEP ] Decrease the volume, you can specify a step (0 > 100). --volume=VOLUME Set the volume: 0 > 100. --reload Reload the songs from your music folder. --quit, --plunge Quit Bluemindo. AUTHOR
bluemindo was written by Erwan Briand <erwan@codingteam.net>. This manual page was written by Thibaut GIRKA <thibaut.girka@gmail.com>, for the Debian project (but may be used by others). June 22, 2008 bluemindo(1)
All times are GMT -4. The time now is 08:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy