LogFile=log.txt
TargetDir=Landing
> ${LogFile}.new
while read date infos
do
set -- ${infos}
eval status=\$$#
# Keeps entries with status not equal to failed
if [ "${status}" != "failed" ]
then
echo "${date} ${infos}" >> ${LogFile}.new
continue
fi
# Extract file in each failed directory
new_failed_dirs=""
while [ $# -gt 1 ]
do
dir=$1
shift
file="${dir}/file_${date}.txt"
echo "\nExtracting file ${file} ..."
if cp ${file} ${TargetDir}/
then
echo "Ok."
else
echo "Failed."
new_failed_dirs="${new_failed_dirs} ${dir}"
fi
done
# Write failed directory into new log
if [ -n "${new_failed_dirs}" ]
then
echo "${date} ${new_failed_dirs} failed" >> ${LogFile}.new
fi
done < log.txt
mv ${LogFile} ${LogFile}.old && mv ${LogFile}.new ${LogFile}
Extracting file SER1/file_2010-02-19.txt ...
cp: SER1/file_2010-02-19.txt: No such file or directory
Failed.
Extracting file SER2/file_2010-02-19.txt ...
Ok.
Extracting file SER2/file_2010-02-10.txt ...
cp: SER2/file_2010-02-10.txt: No such file or directory
Failed.
Extracting file SER1/file_2010-04-14.txt ...
cp: SER1/file_2010-04-14.txt: No such file or directory
Failed.
Extracting file SER1/file_2010-04-26.txt ...
Ok.
Extracting file SER2/file_2010-04-26.txt ...
cp: SER2/file_2010-04-26.txt: No such file or directory
Failed.
Hi everyone..
Anybody having idea to get the latest file from CVS repository through schell scripts.
Thanks in advance.
Regards
shahid Bakshi (4 Replies)
Hi, I have 600 text files. In each txt file, I have 3 columns, e.g:
File 1
a 0.21 0.003
b 0.34 0.004
c 0.72 0.002
File 2
a 0.25 0.0083
b 0.38 0.0047
c 0.79 0.00234
File 3
a 0.45 0.0063
b 0.88 0.0027
c 0.29 0.00204
...
my filename as "sc2408_0_5278.txt sc2408_0_5279.txt... (2 Replies)
Hi,
I would like to seek for methods to do selective extraction of line froma file. The scenario as follows:
I have a file with content:
message a
received on 11:10:00
file size: 10 bytes
send by abc
message b
received on 11:20:00
file size: 10 bytes
send by abc (3 Replies)
Hello dear friends,
My problem as explained below seems really basic.
Fact is that I'm totally new to programming, and have only a week to produce a script ( CShell or Perl ? ) to perform this action.
While searching on the forums, I found a command that could help me, but I don't know... (2 Replies)
Hello all,
I want to extract some particular data from a files and than add all the values .
but i m not able to cut the particular word(USU-INOCT and USU-OUTOCT) as it is coming not in column. and than able to add values coming in it .
can anyone help me Please
cat <file name>
... (7 Replies)
I have roughly ~30 .txt files in a directory which all have unique names. These files all contain text arranged in columns separated by whitespace (example file:
[#YY MM DD hh mm WDIR WSPD GST WVHT DPD APD MWD PRES ATMP WTMP DEWP VIS TIDE
#yr mo dy hr mn degT m/s m/s m sec ... (5 Replies)
Our university has upgraded its version of a computational chemistry program that our group uses quite regularly. In the past we have been able to extract frequency spectra from log files that are generated. Since the upgrade, the viewing program errors out. I've been able to trace down the changes... (16 Replies)
hey!!! I have 2 files file1 is as ids.txt and is
>gi|546473186|gb|AWWX01630222.1|
>gi|546473233|gb|AWWX01630175.1|
>gi|546473323|gb|AWWX01630097.1|
>gi|546474044|gb|AWWX01629456.1|
>gi|546474165|gb|AWWX01629352.1|
file2 is sequences.fasta and is like
>gi|546473233|gb|AWWX01630175.1|... (9 Replies)
The below bash will untar each tar.bz2 folder in the directory, then remove the tar.bz2.
Each of the tar.bz2 folders ranges from 40-75GB and currently takes ~2 hours to extract. Is there a way to speed up the extraction process?
I am using a xeon processor with 12 cores. Thank you :).
... (7 Replies)
Please know that I am very new to unix and trying to learn 'on the job'. I'm only manipulating large tab-delimited files (millions of rows), but I'm stuck and don't know how to proceed with the following. Hoping for some friendly advice :)
I have 2 tab-delimited files - with differing column &... (10 Replies)
Discussion started by: GTed
10 Replies
LEARN ABOUT DEBIAN
grmiregistry
GRMIREGISTRY(1) GNU GRMIREGISTRY(1)NAME
grmiregistry - - Remote object registry
SYNOPSIS
grmiregistry [OPTIONS]... PORT
DESCRIPTION
grmiregistry starts a remote object registry on the current host. If no port number is specified, then port 1099 is used.
OPTIONS
Registry process control:
-restart
Restart RMI naming service, clearing persistent naming database, if any.
-stop
Stop RMI naming service.
Persistence:
-persistent
Make RMI naming service persistent.
-directory DIR
Directory in which to store persistent data.
Debugging:
-verbose
Log binding events to standard out.
Standard options:
-help
Print help text, then exit.
-version
Print version number, then exit.
-JOPTION
Pass argument to the Java runtime.
BUGS SEE ALSO java(1), ...
AUTHOR 0.98 2010-07-05 GRMIREGISTRY(1)