Sponsored Content
Full Discussion: Error when executing script
Operating Systems Linux Red Hat Error when executing script Post 302997002 by anaigini45 on Friday 5th of May 2017 06:57:06 AM
Old 05-05-2017
But I want to copy files with a certain date over from one dir to another.
How do i do this?

I tried using the for loop like this :

Code:
[root@L28tstream1 emokheng]# for (( i=16; i<20; i++ ));
> do
> cp -r * /home/emoaigin/;
> done
cp: overwrite `/home/emoaigin/afterinstallforeign.pl'? y
cp: overwrite `/home/emoaigin/foreign.pl'? y
cp: overwrite `/home/emoaigin/afterinstallforeign.pl'? y
cp: overwrite `/home/emoaigin/foreign.pl'? y
cp: overwrite `/home/emoaigin/afterinstallforeign.pl'? y
cp: overwrite `/home/emoaigin/foreign.pl'? y
cp: overwrite `/home/emoaigin/afterinstallforeign.pl'? y
cp: overwrite `/home/emoaigin/foreign.pl'? y
[root@L28tstream1 emokheng]#

As you can see, it does the loop for times, (i.e copying 2 files 4 times).
This is not I want. What I want is for the script to recognize the files dated from the 16th to the latest date, and copy it over to the other directory, without repeating or overwriting like above.

Is this possible?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

error while executing the script

Hello I am executing the following script nawk 'NR == 1 || substr($0,63,5) ~ /H... / && \ _++ == 2 { fn && close(fn); fn = "part_" ++c; _ = 1 } { print > fn }' sample.dat When i execute as it is it is executing fine. but when i execute the whole script as a single line like below ... (2 Replies)
Discussion started by: dsdev_123
2 Replies

2. Shell Programming and Scripting

Error while executing a script

My script is as below : #!/bin/sh for line in `cat Results.txt` do FEILD1=`echo $line |awk -F"|" '{print $1}'` FEILD2=`echo $line |awk -F"|" '{print $2}'` FEILD3=`echo $line |awk -F"|" '{print $3}'` FEILD4=`echo $line |awk -F"|" '{print $4}'` echo "$FEILD1 $FIELD2 $FIELD3 $FIELD4" done ... (15 Replies)
Discussion started by: shwetainnani
15 Replies

3. Shell Programming and Scripting

Error while executing the below script

I am executing the below in telnet #!/usr/bin/ksh File1=simple.txt # The file to check LogFile=simple.log # The log file DelayMax=30 # Timeout delay Tolerance=2 # BEGIN ############################## while true do StampNow=$(date +%s)/60 # stamp in minutes ... (3 Replies)
Discussion started by: chinniforu2003
3 Replies

4. UNIX for Dummies Questions & Answers

Error Executing the script.

Hi , I m getting an error after executing the script. My script. Script is used to find out the date on 8 different machines(mentioned in SERVERNAMES file). I have added public key to avoid ssh password and ssh without password working fine. #!/bin/sh fn_VMFind() { Date=`ssh -t... (5 Replies)
Discussion started by: pinga123
5 Replies

5. Shell Programming and Scripting

Error while executing a script

Hi Please assist. Im getting an error while execuing the script name d "cdsnd.basel.cd_new " as siiadm user. Thanks. siiadm> ls -l total 64 -rwxr-xr-x 1 siiadm sboadm 1004 Sep 17 2008 cdsnd.basel.cd -rwxr-xr-x 1 siiadm sapsys 998 Nov 16 09:14 cdsnd.basel.cd_new... (1 Reply)
Discussion started by: samsungsamsung
1 Replies

6. Shell Programming and Scripting

getting the error 'not found' while executing the script

Hi, I am not able to figure out what the problem is: getting the following error sqltst.sh: 1: not found here is the script #!/bin/sh . /home/dev1/.profile . /home/dev1/.infenv `sqlplus -s $REPDB_LOGON << EOF SET SERVEROUT ON SET FEEDBACK OFF SET HEADING OFF SET TRIMSPOOL... (4 Replies)
Discussion started by: svajhala
4 Replies

7. Shell Programming and Scripting

Error executing script

Please delete de thread. Thanks. (10 Replies)
Discussion started by: Rodrih92
10 Replies

8. Linux

Libssh2 error while executing script

hi all, i am getting libssh2 error while executing script in RHEL 6, when i locate that file its not there below is the ouput of this # locate libssh2_agent_init # cat /etc/issue Red Hat Enterprise Linux Server release 6.1 (Santiago) Kernel \r on an \m how do i resolve this issue, i... (1 Reply)
Discussion started by: muzaffar.k
1 Replies

9. UNIX for Dummies Questions & Answers

Error executing the script

I have the following script test.sh owned by dwdev account and group dwdev, the permissions on the script are as follows. -rw-r-x--- 1 dwdev dwdev 279 Sep 17 13:19 test.sh Groups: cat /etc/group | grep dwdev dwdev:x:704:dwdev dwgroup:x:725:dwdev writers:x:726:dwdev User: cat /etc/passwd |... (3 Replies)
Discussion started by: Ariean
3 Replies

10. Shell Programming and Scripting

Gettting error while executing script

getting error as below while executing script in linux. OS version: Linux VGP-3GPSDB-LX 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux ./imxtract.sh: line 395: unexpected EOF while looking for matching ``' ./imxtract.sh: line 402: syntax error:... (1 Reply)
Discussion started by: Riverstone
1 Replies
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)
All times are GMT -4. The time now is 06:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy