04-13-2006
i have modified my script
can anyone throw light on this...pls???
# 'POSTPAID' loop starts here
ls $source/home/selectica/Outbox > $source/Log/ox3
grep "New_Ordr_" $source/Log/ox3 > $source/Log/ox4
grep "_POSTPAID.xml" $source/Log/ox4 > $source/Log/ox3
for file3 in `grep "New_Ordr_" $source/Log/ox3`
do
listfile="Order_POSTPAID_`date +%d%m%Y`.lst"
echo $file3 >> $source/Log/$listfile
logfile="Order_POSTPAID_`date +%d%m%Y`.log"
echo "################################################################################"
echo "DATE....SYSTEM...STATUS.....FILE...........TIME " >> $source/Log/$logfile
echo $file3 > $source/Log/name2
file4=`cut -b 5- $source/Log/name2`
sys4=SELECTICA
stat4=RECEIVED
echo "`date +%D`...$sys4...$stat4...$file3...`date +%T`" >> $source/Log/$logfile
sleep 2
echo "`date +%D`....IT IS A POSTPAID ORDER.........." >> $source/Log/$logfile
sys5=ADC
stat5=RECEIVED
mstat5=RENAMED
cp $source/home/selectica/Outbox/$file3 $source/home/adc/Inbox/$file3
echo "`date +%D`...$sys5...$stat5...$file3....`date +%T`" >> $source/Log/$logfile
mv $source/home/adc/Inbox/$file3 $source/home/adc/Inbox/$file4
chmod 666 $source/home/adc/Inbox/$file4
echo "`date +%D`...$sys5...$mstat5...$file4...`date +%T`" >> $source/Log/$logfile
done
sleep 5
# New addition starts /13042006
ls $source/home/adc/Archive > $source/Log>ox5
grep "Ordr_10" $source/Log/ox5 > $source/Log/ox6
grep "_POSTPAID.xml" $source/Log/ox6 > $source/Log/ox5
for file5 in `grep "Ordr_10" $source/Log/ox5
do
sys6=CLARIFY
stat6=COPIED
mstat6=RENAMED
sys7=OMS
stat7=COPIED
mstat7=RENAMED
mv $source/home/adc/Archive/$file5 $source/home/adc/Archive/New_$file5
file6=`ls $source/home/adc/Archive |grep "New_"|grep -v grep`
#clarify copy
cp $source/home/adc/Archive/$file6 $source/home/clarify/Inbox/$file6
echo "`date +%D`...$sys6...$stat6...$file6....`date +%T`" >> $source/Log/$logfile
mv $source/home/clarify/Inbox/$file6 $source/home/clarify/Inbox/$file5
echo "`date +%D`...$sys6...$mstat6...$file5....`date +%T`" >> $source/Log/$logfile
chmod 666 $source/home/clarify/Inbox/$file5
# oms copy
cp $source/home/adc/Archive/$file6 $source/home/oms/Inbox/$file6
echo "`date +%D`...$sys7...$stat7...$file6....`date +%T`" >> $source/Log/$logfile
mv $source/home/oms/Inbox/$file6 $source/home/clarify/Inbox/$file5
echo "`date +%D`...$sys7...$mstat7...$file5....`date +%T`" >> $source/Log/$logfile
chmod 666 $source/home/clarify/Inbox/$file5
mv $source/home/adc/Archive/$file6 $source/home/adc/PArchive/$file5
done
# New addition ends /13042006sleep 2
stat8=ARCHIVED
mv $source/home/selectica/Outbox/$file3 $source/home/selectica/Archive/$file4
echo "`date +%D`...$sys4...$stat8....$file3....`date +%T`" >> $source/Log/$logfile
done
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I need to access files from a specific folder of a Linux system from an another Linux System Remotely.
I know how to, Export a folder on One SCO System & can access the same by using Import via., NFS in the Sco Unix SVR4 System using the scoadmin utility.
Also, I know to use mount -t ... (2 Replies)
Discussion started by: S.Vishwanath
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have to apply service pack from cd. so i have to copy some file from cd to linux directory. Can any body help me what command to use access from cd and copy file.
Thanks
sam71 (2 Replies)
Discussion started by: sam71
2 Replies
3. SuSE
Guys
i have 2 SUSE Linux Enterprise Server 10 SP1 (i586) boxes.if i take a look into /etc/security/access.conf ,i see following lines at the eof
# All other users should be denied to get access from all sources.
#- : ALL : ALL
- : myID : ALL
now earlier i had written scripts where files... (1 Reply)
Discussion started by: ak835
1 Replies
4. UNIX for Dummies Questions & Answers
hi all,
i want to know y kernel is giving access for multiple users to access a file when one user may be the owner is executing that file. Because other user can manipulate that file when the other user is executing that file, it will give the unexpected result to owner . plz help me... (1 Reply)
Discussion started by: jimmyuk
1 Replies
5. IP Networking
Hi
Good Day, i would like to ask for further info about my problems experiencing this evening. Im a PPP0 connection in the internet using 3G located in asia pacific region.i had this problem this evening in my INTERNET connections that there are some sites i can't open example ( Gizmodo.com,... (2 Replies)
Discussion started by: jao_madn
2 Replies
6. AIX
Hi all,
I'm using AIX v 5.3
I want to create system users to access through ftp or sftp and restrict those users into specific directory and don't traverse the whole file system just to be restricted within a directory and don't get shell access . i don't want to use any other third party... (7 Replies)
Discussion started by: h@foorsa.biz
7 Replies
7. Solaris
Hi all,
I have this statement:
cp `ls -lrt |awk '{if($6=="Feb") print $9}'|wc -l` /smartapp/reports/archive_jan_feb_march/
However it fails with:
cp: cannot access 948
The owner for this script is not a concern, May I know which part went wrong? (8 Replies)
Discussion started by: nikhil kasar
8 Replies
8. Solaris
Hi All,
I want to configure samba share permission so that only directory creator/owner has a read and write permission and other users should not have any read/write access to that folder.Will that be possible and how can this be achieved within samba configuration.
Regards,
Sahil (1 Reply)
Discussion started by: sahil_shine
1 Replies
9. Homework & Coursework Questions
Dear Friends,
This is not a problem , it's a course work (UNIX scenario)....
As part of it I am searching Remote Attacks and find points as
1. Exploiting a listening service
2. Routing through Unix system that is providing security between 2 or more networks
3. User initiated Remote execution... (1 Reply)
Discussion started by: anespa
1 Replies
10. Proxy Server
Dear all experts here,
:)
I would like to install a proxy server on Linux server to perform solely to control the access of Web server.
In this case, some of my vendor asked me to try Squid and I have installed it onto my Linux server.
I would like know how can I set the configuration to... (1 Reply)
Discussion started by: kwliew999
1 Replies
LEARN ABOUT DEBIAN
dpkg::log
DPKG::Log(3pm) User Contributed Perl Documentation DPKG::Log(3pm)
NAME
DPKG::Log - Parse the dpkg log
VERSION
version 1.20
SYNOPSIS
use DPKG::Log;
my $dpkg_log = DPKG::Log->new('filename' => 'dpkg.log', 'parse' => 1);
DESCRIPTION
This module is used to parse a logfile and store each line as a DPKG::Log::Entry object.
METHODS
$dpkg_log = DPKG::Log->new()
$dpkg_log = DPKG::Log->new('filename' => 'dpkg.log')
$dpkg_log = DPKG::Log->new('filename' => 'dpkg.log', 'parse' => 1 )
Returns a new DPKG::Log object. If parse is set to a true value the logfile specified by filename is parsed at the end of the object
initialisation. Otherwise the parse routine has to be called. Filename parameter can be omitted, it defaults to /var/log/dpkg.log.
Optionally its possible to specify from or to arguments as timestamps in the standard dpkg.log format or as DateTime objects. This
will limit the entries which will be stored in the object to entries in the given timerange. Note that, if this is not what you want,
you may ommit these attributes and can use filter_by_time() instead.
By default the module will assume that those timestamps are in the local timezone as determined by DateTime::TimeZone. This can be
overridden by giving the argument time_zone which takes a timezone string (e.g. 'Europe/Berlin') or a DateTime::TimeZone object.
Additionally its possible to override the timestamp_pattern by specifying timestamp_format. This has to be a valid pattern for
DateTime::Format::Strptime.
$dpkg_log->filename
$dpkg_log->filename('newfilename.log')
Get or set the filename of the dpkg logfile.
$dpkg_log->parse
$dpkg_log->parse('time_zone' => 'Europe/Berlin')
$dpkg_log->parse('time_zone' => $dt_tz )
Call the parser.
The time_zone parameter is optional and specifies in which time zone the dpkg log timestamps are. If its omitted it will use the
default local time zone. Its possible to specify either a DateTime::TimeZone object or a string.
@entries = $dpkg_log->entries;
@entries = $dpkg_log->entries('from' => '2010-01-01.10:00:00', to => '2010-01-02 24:00:00')
Return all entries or all entries in a given timerange.
from and to are optional arguments, specifying a date before (from) and after (to) which entries aren't returned. If only to is
specified all entries from the beginning of the log are read. If only from is specified all entries till the end of the log are read.
$entry = $dpkg_log->next_entry;
Return the next entry.
@entries = $dpkg_log->filter_by_time(from => ts, to => ts)
@entries = $dpkg_log->filter_by_time(from => ts)
@entries = $dpkg_log->filter_by_time(to => ts)
@entries = $dpkg_log->filter_by_time(from => ts, to => ts, entry_ref => $entry_ref)
Filter entries by given from - to range. See the explanations for the new sub for the arguments.
If entry_ref is given and an array reference its used instead of $self->{entries} as input source for the entries which are to be
filtered.
($from, $to) = $dpkg_log->get_datetime_info()
Returns the from and to timestamps of the logfile or (if from/to values are set) the values set during object initialisation.
SEE ALSO
DPKG::Log::Entry, DateTime, DateTime::TimeZone
AUTHOR
Patrick Schoenfeld <schoenfeld@debian.org>.
COPYRIGHT AND LICENSE
Copyright (C) 2011 Patrick Schoenfeld <schoenfeld@debian.org>
This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.
perl v5.10.1 2011-02-26 DPKG::Log(3pm)