creating multiple sub-/directories using a shell script
0
Hi,
I am looking for a way of creating multiple directories using the mkdir -p command in a shell script.
I'm working with an Ubuntu machine and try to do something like that:
#!/bin/sh
# Create required directories to support pipelines (BWAse, BWApe, and others to come...)
I would like to have each of the directories in the {} as sub-directories of the directory before.
The problem is that I get only one directory with the complete name inclusive the {}.
It looks like that:
What am doing wrong? Is there a way of automating this procedure?
Thanks
Assa
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Hello
I have a directory structure with year in format 4 digits, e.g 2009, below which is month format 1 or 2 digits, e.g 1 or 12, blow which is day format 1 or 2 digits, e.g 1 or 31.
I want to change the names of lots of directories to the be
Year - 4 digits , e.g 2009 - No change here... (4 Replies)
I have one parent directory and within that parent directory there are several other sub-directories and within those sub-directories there are several other "large number" of sub-directories.
All the sub directories have a shell script in them with a common file name execute_command.sh I want... (4 Replies)
Hi,
Very unfamiliar with unix/linux stuff. Our admin is on vacation so, need help very quickly.
I have directories (eg 40001, 40002, etc) that each have one subdirectory (01).
Each subdir 01 has multiple subdirs (001, 002, 003, etc). They are same in each dir.
I need to keep the top and... (7 Replies)
Hi ,
I want a script to create a directories at different locations.
suppose i am on home/path/zone1. I want to create a directory of current month in this location.
Then i want to create the same current month directory in home/path/zone2.like this for 9 diffrent zones.
I can do this... (4 Replies)
how can i move "dataName".sql.gz into a folder called 'database' and then move "$fileName".tar.gz * .htaccess into a folder called 'www' with the entire gzipped file being "$fileName".tar.gz? Is this doable or overly complex.
so
mydemo--2015-03-23-1500.tar.gz
> database
-... (5 Replies)
for UserName in `cat users` ; do useradd -d /u02 -s /usr/libexec/openssh/sftp-server -G ftp-users $UserName ;
PassWord=$( echo $( tr '' '' <<< ${UserName:0:1} )${UserName:1} ) ;
echo "$PassWord@123" | passwd $UserName --stdin ; done
can some one explain what the bold text do
Please use... (5 Replies)
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
Hi All,
I am new in scripting and working in a project where we have RSyslog servers over CentOS v7 and more than 200 network devices are sending logs to each RSyslog servers. For each network devices individual folders create on the name of the each network devices IP addresses.The main... (7 Replies)
Hello everyone,
First of all this is my first post and im fairly new to working with Unix and creating scripts etc. so there will probably be wrong phrases used.
Lets get to my questions.
I have multiple scripts that submit Slurms/Jobs to the cluster starting like this and doing certain... (3 Replies)
Discussion started by: idbemad
3 Replies
LEARN ABOUT DEBIAN
combine_tessdata
COMBINE_TESSDATA(1)COMBINE_TESSDATA(1)NAME
combine_tessdata - combine/extract/overwrite Tesseract data
SYNOPSIS
combine_tessdata [OPTION] FILE...
DESCRIPTION combine_tessdata(1) is the main program to combine/extract/overwrite tessdata components in [lang].traineddata files.
To combine all the individual tessdata components (unicharset, DAWGs, classifier templates, ambiguities, language configs) located at, say,
/home/$USER/temp/eng.* run:
combine_tessdata /home/$USER/temp/eng.
The result will be a combined tessdata file /home/$USER/temp/eng.traineddata
Specify option -e if you would like to extract individual components from a combined traineddata file. For example, to extract language
config file and the unicharset from tessdata/eng.traineddata run:
combine_tessdata -e tessdata/eng.traineddata
/home/$USER/temp/eng.config /home/$USER/temp/eng.unicharset
The desired config file and unicharset will be written to /home/$USER/temp/eng.config /home/$USER/temp/eng.unicharset
Specify option -o to overwrite individual components of the given [lang].traineddata file. For example, to overwrite language config and
unichar ambiguities files in tessdata/eng.traineddata use:
combine_tessdata -o tessdata/eng.traineddata
/home/$USER/temp/eng.config /home/$USER/temp/eng.unicharambigs
As a result, tessdata/eng.traineddata will contain the new language config and unichar ambigs, plus all the original DAWGs, classifier
templates, etc.
Note: the file names of the files to extract to and to overwrite from should have the appropriate file suffixes (extensions) indicating
their tessdata component type (.unicharset for the unicharset, .unicharambigs for unichar ambigs, etc). See k*FileSuffix variable in
ccutil/tessdatamanager.h.
Specify option -u to unpack all the components to the specified path:
combine_tessdata -u tessdata/eng.traineddata /home/$USER/temp/eng.
This will create /home/$USER/temp/eng.* files with individual tessdata components from tessdata/eng.traineddata.
OPTIONS -e .traineddata FILE...: Extracts the specified components from the .traineddata file
-o .traineddata FILE...: Overwrites the specified components of the .traineddata file with those provided on the comand line.
-u .traineddata PATHPREFIX Unpacks the .traineddata using the provided prefix.
CAVEATS
Prefix refers to the full file prefix, including period (.)
COMPONENTS
The components in a Tesseract lang.traineddata file as of Tesseract 3.02 are briefly described below; For more information on many of these
files, see http://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3
lang.config
(Optional) Language-specific overrides to default config variables.
lang.unicharset
(Required) The list of symbols that Tesseract recognizes, with properties. See unicharset(5).
lang.unicharambigs
(Optional) This file contains information on pairs of recognized symbols which are often confused. For example, rn and m.
lang.inttemp
(Required) Character shape templates for each unichar. Produced by mftraining(1).
lang.pffmtable
(Required) The number of features expected for each unichar. Produced by mftraining(1) from .tr files.
lang.normproto
(Required) Character normalization prototypes generated by cntraining(1) from .tr files.
lang.punc-dawg
(Optional) A dawg made from punctuation patterns found around words. The "word" part is replaced by a single space.
lang.word-dawg
(Optional) A dawg made from dictionary words from the language.
lang.number-dawg
(Optional) A dawg made from tokens which originally contained digits. Each digit is replaced by a space character.
lang.freq-dawg
(Optional) A dawg made from the most frequent words which would have gone into word-dawg.
lang.fixed-length-dawgs
(Optional) Several dawgs of different fixed lengths -- useful for languages like Chinese.
lang.cube-unicharset
(Optional) A unicharset for cube, if cube was trained on a different set of symbols.
lang.cube-word-dawg
(Optional) A word dawg for cube's alternate unicharset. Not needed if Cube was trained with Tesseract's unicharset.
lang.shapetable
(Optional) When present, a shapetable is an extra layer between the character classifier and the word recognizer that allows the
character classifier to return a collection of unichar ids and fonts instead of a single unichar-id and font.
lang.bigram-dawg
(Optional) A dawg of word bigrams where the words are separated by a space and each digit is replaced by a ?.
lang.unambig-dawg
(Optional) TODO: Describe.
lang.params-training-model
(Optional) TODO: Describe.
HISTORY combine_tessdata(1) first appeared in version 3.00 of Tesseract
SEE ALSO tesseract(1), wordlist2dawg(1), cntraining(1), mftraining(1), unicharset(5), unicharambigs(5)COPYING
Copyright (C) 2009, Google Inc. Licensed under the Apache License, Version 2.0
AUTHOR
The Tesseract OCR engine was written by Ray Smith and his research groups at Hewlett Packard (1985-1995) and Google (2006-present).
02/09/2012 COMBINE_TESSDATA(1)