Sponsored Content
Full Discussion: move script
Top Forums Shell Programming and Scripting move script Post 302720335 by rdrtx1 on Tuesday 23rd of October 2012 07:27:50 PM
Old 10-23-2012
Try:
Code:
 
#!/bin/bash
old=/tmp/files
new=/root/mp3
find $old -name "*.*" | while read FILE
do
  newf=$(echo $FILE | sed 's/ /_/g')
  ndir=$new${FILE#${old}}
  ndir=$(dirname $ndir)
  [[ -d "$ndir" ]] || mkdir -p "$ndir"
  mv "$FILE" "$ndir"
  file "$newf" |egrep -w 'MP3|WAVE'
  if [ $? = 0 ]
  then
    cp .................
  fi
done

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with Copy Move Script

Hello Gurus! Please help! I would like to get some help with the following: I'm working right now on a Data Warehouse project and I need to automate a manual procedure I am using to process the data files coming into the database, any information/ideas and or which script language to go... (4 Replies)
Discussion started by: alfpathros
4 Replies

2. Shell Programming and Scripting

script to move logs

Does anyone have a good script to move log files from a cron? There are a lot of logs, about 100 or more and they are constantly being written too. (7 Replies)
Discussion started by: photon
7 Replies

3. Shell Programming and Scripting

script to move

Hi, Want to write a script which move like: these are files in different dir structure, /home/darshak/test/sh/new.txt /home/darshak/test/new1.txt /home/darshak/test/pl/file.txt script will move same structure as above but in different dir, /usr/local/test/sh/new.txt... (2 Replies)
Discussion started by: darshakraut
2 Replies

4. UNIX for Dummies Questions & Answers

Move Script

Hi I am very new to scripts and only have a basic knowledge What i am trying to do is move files from one directory to another, but i need to make sure the file is stable before it moves the file to the destination. Here is the script that i am using that is moving the files, it part of a script... (8 Replies)
Discussion started by: treds
8 Replies

5. UNIX for Dummies Questions & Answers

Move command within script

Anyone have an idea to why the statement below does not work within a script but works when issued from the command line? mv /dir_files/submit.log* /bintemp (1 Reply)
Discussion started by: bwcberb
1 Replies

6. UNIX Desktop Questions & Answers

Help with Script to Move Directories

Hi I am after a simple script to move folders/files from one directory into another directory on the same server. I want to run a cron so this can run at midnight. Issue is there will not always be data in the source folder. This script works fine but it errors if nothing exists in the source... (3 Replies)
Discussion started by: treds
3 Replies

7. Shell Programming and Scripting

Script move files by name

hi, I have a lot of files named xxxxx__AA.txt, xxxxx__BB.txt, xxxxx__CC.txt and I would like to move xxxxx__AA.txt in AA directory, xxxxx__BB.txt in BB etc. Could you help me do it in bash script? (5 Replies)
Discussion started by: corfuitl
5 Replies

8. Shell Programming and Scripting

Script to move certain no. of files every second

Hi All, I am new to Linux/Scripting and need some assistance in coming up with a script that can move certain amount of files from one directory to other every seconds. Usercase: We have around 100k files in tmp directory on my server which needs to be moved to another folder to get... (3 Replies)
Discussion started by: Raj1184
3 Replies
NORMALIZE-MP3(1)					      General Commands Manual						  NORMALIZE-MP3(1)

NAME
normalize-mp3 - adjust levels of mp3 or ogg files by running normalize-audio(1), then re-encoding SYNOPSIS
normalize-mp3 [OPTION]... [FILE]... normalize-ogg [OPTION]... [FILE]... DESCRIPTION
Normalize volume of mp3 or ogg files by decoding, running normalize, and re-encoding. This requires as much extra disk space as the largest mp3 or ogg file, decoded. Note that for batch and mix mode, all files must be decoded, so there must be enough disk space for the decoded copies of all specified mp3 and ogg files. --ogg Convert files to OGG, regardless of original format --mp3 Convert files to MP3, regardless of original format --bitrate BR Set bitrate of re-encoded file (default 128) --tmpdir TMP Put temporary WAV files in temp directory TMP --notags Do not copy ID3 or OGG tags to the output file The following four options may be used to set the encoder and decoder commands for mp3 and ogg vorbis. %m is expanded to the name of the mp3 or vorbis file, %w expands to the name of the temporary WAV file, and %b expands to the bitrate, as specified by the --bitrate option. Run normalize-mp3 with no arguments to see the default values. --mp3encode=X mp3 encoder --mp3decode=X mp3 decoder --oggencode=X ogg vorbis encoder --oggdecode=X ogg vorbis decoder -h Display this help and exit. -V Display version information and exit. These arguments are passed as arguments to normalize-audio. Run "normalize-audio --help" for more info. -a AMP -g ADJ -n -T THR -b -m -v -q REPORTING BUGS Report bugs to <chrisvaill@gmail.com>. SEE ALSO
The normalize-audio(1) Man page NOTES
This page was provided by Eduardo Macan <macan@debian.org> September 2001 NORMALIZE-MP3(1)
All times are GMT -4. The time now is 12:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy