Help with rysnc and find with date variable


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with rysnc and find with date variable
# 1  
Old 12-21-2011
Help with rysnc and find with date variable

I want to have a script to create directory labled with the date, convert a load of flac files to mp3 and then find and rysnc the newly created mp3 file to the dated directory. Here's what I have done so far but the rsync command doesn't work:
Code:
#!/bin/bash
#set date variable as now
DATE=`/bin/date +%y%m%d`

#create dir for DATE
mkdir /media/raid10/music/newmp3/$DATE

#run flac2mp3
/media/raid10/music/flac2mp3_wPics/flac2mp3_wPics/flac2mp3.pl /media/raid10/music/flac /media/raid10/music/mp3

#copy new mp3 to DATE directory
rsync `find /media/raid10/music/mp3 -type -f -iname "*.mp3" -atime $DATE` /media/raid10/music/newmp3/$DATE

Any help would be greatly appreciated!!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to replace a parameter(variable) date value inside a text files daily with current date?

Hello All, we what we call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below: abc.txt ------------------ line1 line2 line3 $$EDWS_DATE_INSERT=08-27-2019 line4 $$EDWS_PREV_DATE_INSERT=08-26-2019 I am trying to... (1 Reply)
Discussion started by: pradeepp
1 Replies

2. UNIX for Beginners Questions & Answers

Script to find a date variable and increment it

Hi, I have parameter file wo_location.prm which has a date variable $last_upd_date= 02032016. I need to write a unix shell script to find that variable and increment it by 1 day. The path to the file is root/dir_lc/shared/param/wo_location.prm and the variable is $last_upd_date. Any... (2 Replies)
Discussion started by: isenhiem
2 Replies

3. UNIX for Dummies Questions & Answers

Find the count of files by last created date based on the given date range

My unix version is IBM AIX Version 6.1 I tried google my requirement and found the below answer, find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20" But newer command is not working in AIX version 6.1 unix I have given my requirement below: Input: atr files: ... (1 Reply)
Discussion started by: yuvaa27
1 Replies

4. Shell Programming and Scripting

Convert a date stored in a variable to epoch date

I am not able to pass date stored in a variable as an argument to date command. I get current date value for from_date and to_date #!/usr/bin/ksh set -x for s in server ; do ssh -T $s <<-EOF from_date="12-Jan-2015 12:02:09" to_date="24-Jan-2015 13:02:09" echo \$from_date echo... (7 Replies)
Discussion started by: raj48
7 Replies

5. Shell Programming and Scripting

Find week of the year for given date using date command inside awk

Hi all, Need an urgent help on the below scenario. script: awk -F"," 'BEGIN { #some variable assignment} { #some calculation and put values in array} END { year=#getting it from array and assume this will be 2014 month=#getting it from array and this will be 05 date=#... (7 Replies)
Discussion started by: vijaidhas
7 Replies

6. UNIX for Dummies Questions & Answers

compare two directories after rysnc

Hi, I ran rsync command to copy all files, directories and subdirectories from /home/dir1 to another Target directory /home/dir2 Now I want to make sure everything is copied over without missing anything. Is there a command I can run which will compare both directories and check to see if I am... (4 Replies)
Discussion started by: tkhan9
4 Replies

7. UNIX for Dummies Questions & Answers

rysnc

hi I have a rsync working between two servers but i would like to write this to a daily log on completion to a area on one of the servers. This way i can check if sync was successful easily. Rsync i am running is as follows rsync -aWv -e ssh --stats progress --delete --ignore-errors... (2 Replies)
Discussion started by: treds
2 Replies

8. OS X (Apple)

bizar rysnc problem

Hi all, i'm syncing two raid sets together using "rsync -avE --delete" i build the two raid sets identical to each other using storenext , however when i let the script run a couple of times my destination is about 300 GB larger then my source. i run the command as root on a 10.5.6 Xserve and... (2 Replies)
Discussion started by: wessel
2 Replies

9. UNIX for Advanced & Expert Users

date issue-find prevoius date in a patricular format

Hi , I have written a shell script that takes the current date on the server and stores it in a file. echo get /usr/home/data-`date '+%Y%d'`.xml> /usr/local/sandeep/GetFILE.ini I call this GetFILE.ini file from an sftp program to fetch a file from /usr/home/ as location. The file is in... (3 Replies)
Discussion started by: bsandeep_80
3 Replies
Login or Register to Ask a Question
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)