05-07-2010
Move file based on filename
Hi All
I need a script to manipulate files based on a filename:
example filename: 66600_042706.pdf
the script will create a directory 66000 only if this directory is not existing. If that directory is existing it will just move the file to 66000/666000_042706.pdf
in addition, i want to make sure that when moving the filename to the directory and there's an existing file with the same filename, it will add a random digit e.g. 66000/66000_042706_123.pdf
thanks
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to move a bunch of files into folders that have the same name. I wanted to either do this with some filter command or some type of batch file that I could save that would already include all of the mv commands since I will have to do this process often. Whatever method you think is easier.
... (7 Replies)
Discussion started by: italia5
7 Replies
2. UNIX for Dummies Questions & Answers
I am trying to create files with special characters in its filenames for testing purposes. This is on a Linux RHEL4 but this should also be applicable on a Unix shell.
I am able to create files with special characters in the filenames...e.g.
cp -pv foo.gif \*special.gif
cp -pv foo.gif \... (6 Replies)
Discussion started by: sqa777
6 Replies
3. UNIX for Dummies Questions & Answers
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (2 Replies)
Discussion started by: Sriranga
2 Replies
4. Shell Programming and Scripting
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (4 Replies)
Discussion started by: Sriranga
4 Replies
5. Shell Programming and Scripting
I know this gets covered quite a bit in the forum and I think there is enough there for me to figure out how to do what I am trying to do, I just don't think I would do it very efficiently so I am going to ask the question...
I have database log files with date and time stamps in the file like
... (7 Replies)
Discussion started by: slatoms
7 Replies
6. Shell Programming and Scripting
Move all files starting with a specific name to different directory.
This shell script program should have three parameters
File Name
Source Directory
Destination Directory
User should be able to enter ‘AB_CD*' in file name parameter. In this case all the files starting with AB_CD will... (1 Reply)
Discussion started by: chetancrsp18
1 Replies
7. Shell Programming and Scripting
I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>"
So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (1 Reply)
Discussion started by: johannd
1 Replies
8. UNIX for Dummies Questions & Answers
I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>"
So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (7 Replies)
Discussion started by: johannd
7 Replies
9. Shell Programming and Scripting
I'm having problems with my bash script. I would like to find a file matching today's date in the filename, i.e. my_file_20120902.txt and then move it to a different directory, i.e. /tmp. Thanks. (1 Reply)
Discussion started by: jamesi
1 Replies
LEARN ABOUT DEBIAN
hts_engine
htsengine(1) General Commands Manual htsengine(1)
NAME
hts_engine -- HMM-based speech synthesis engine
SYNOPSIS
hts_engine [options] [infile]
DESCRIPTION
This manual page documents briefly the hts_engine command.
This manual page was written for the Debian distribution because the original program does not have a manual page. Instead, it has docu-
mentation in the GNU Info format; see below.
hts_engine is a program that synthesize speech waveform from HMMs trained by the HMM-based speech synthesis system (HTS).
OPTIONS
A summary of options is included below.
-td tree decision tree files for state duration
-tm tree Show version of program.
-tf tree decision tree files for Log F0
-tl tree decision tree files for low-pass filter
-md pdf model files for state duration
-mm pdf model files for spectrum
-mf pdf model files for Log F0
-ml pdf model files for low-pass filter
-dm win window files for calculation delta of spectrum
-df win window files for calculation delta of Log F0
-dl win window files for calculation delta of low-pass filter
-od s filename of output label with duration
-om s filename of output spectrum
-of s filename of output Log F0
-ol s filename of output low-pass filter
-or s filename of output raw audio (generated speech)
-ow s filename of output wav audio (generated speech)
-ot s filename of output trace information
-vp use phoneme alignment for duration
-i i f1 .. fi
enable interpolation & specify number(i),coefficient(f) [1][1--]
-s i sampling frequency [16000][1--48000]
-p i frame period (point) [80][1--]
-a f all-pass constant [0.42][0.0--1.0]
-g i gamma = -1 / i (if i=0 then gamma=0) [0][0--]
-b f postfiltering coefficient [0.0][-0.8--8.0]
-l regard input as log gain and output linear one (LSP)
-r f speech speed rate [1.0][0.0--10.0]
-fm f add half-tone [0.0][-24.0--24.0]
-u f voiced/unvoiced threshold[0.5][0.0--1.0]
-em tree decision tree files for GV of spectrum
-ef tree decision tree files for GV of Log F0
-el tree decision tree files for GV of low-pass filter
-cm pdf filenames of GV for spectrum
-cf pdf filenames of GV for Log F0
-cl pdf filenames of GV for low-pass filter
-jm f weight of GV for spectrum [1.0][0.0--2.0]
-jf f weight of GV for Log F0 [1.0][0.0--2.0]
-jl f weight of GV for low-pass filter [1.0][0.0--2.0]
-k tree GV switch
-z i audio buffer size [1600][0--48000]
infile label file
option '-d' may be repeated to use multiple delta parameters. generated spectrum, log F0, and low-pass filter coefficient sequences are
saved in natural endian, binary (float) format.
EXAMPLE
If you installed hts-voice-nitech-jp-atr503-m001 in the current directory, the following command let you make a voice file from input.lab:
% hts_engine -s 48000 -p 240 -a 0.55
-td tree-dur.inf -tm tree-mgc.inf -tf tree-lf0.inf
-tl tree-lpf.inf -md dur.pdf -mm mgc.pdf
-mf lf0.pdf -ml lpf.pdf -dm mgc.win1
-dm mgc.win2 -dm mgc.win3 -df lf0.win1
-df lf0.win2 -df lf0.win3 -dl lpf.win1
-em tree-gv-mgc.inf -ef tree-gv-lf0.inf -cm gv-mgc.pdf
-cf gv-lf0.pdf -k gv-switch.inf -ow output.wav
input.lab
AUTHOR
This manual page was written by Koichi Akabe vbkaisetsu@gmail.com for the Debian system (and may be used by others). Permission is granted
to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by
the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
htsengine(1)