07-08-2009
compare dats in the shell script.
grep "HP_nv6005ud" mail_log.log | awk '{print $2}' >raju.log
if [ $? -eq 0 ]
then
grep "$testdate" raju.log
if [ "$ydate == $testdate" ]
Hi in the above script $2 gives rge today date. and $ydate is yesterdays date.
not in the if condition i need to compare both the dates.
Please help me in this.
Thanks in advance
Raju
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
I face the problem the if else statement dint return correct result for me
my script as below:
#!/bin/ksh
sqlplus -s /nolog <<EOF
connect databaseuser/password
column num new_value num format 9999
set head off
select count(*) num from table1;
exit num
EOF
if ; then
echo "$?"... (6 Replies)
Discussion started by: jaseloh
6 Replies
2. Shell Programming and Scripting
Hi
How to compare created or modified date of two files
help needed
thanks
Vajiramani :) (9 Replies)
Discussion started by: vaji
9 Replies
3. Shell Programming and Scripting
Hi,
I want to compare two tables fieldwise using shell script. Can anyone help me regarding the same.
The approach which i tried is to first move the two tables in simple txt file where each field is now seperated by space. But i can't retrive each field with "space" as a seperator b'coz there... (1 Reply)
Discussion started by: dtidke
1 Replies
4. UNIX and Linux Applications
hi experts
please help me to compare two files which are in different directory
file1<file will be master file>
(/home/rev/mas.txt}
ex x1
x2
file2 <will be in different folder>
(/home/rev/per/.....)
ex x3
x4
the filesinside per folder i need to compare with master file... (1 Reply)
Discussion started by: revenna
1 Replies
5. Shell Programming and Scripting
Iam trying to compare the string in if else... but some how its not working
following is the code
On executing the above one its giving a error message ': bad number'
in the above parameter l & k are numbers and dbfiles and patchefiles are array
If i do echo ift working fine
... (2 Replies)
Discussion started by: kiranlalka
2 Replies
6. Shell Programming and Scripting
how to compare two lines using shell script? (1 Reply)
Discussion started by: suman_dba1
1 Replies
7. Shell Programming and Scripting
I have a directory with about 6 files that we receive regularly. these 6 files contain information for 3 different units, 2 for each unit. files related to a specific unit are named similarly with a change in number at the end of the file. the numbers should be sequential. for each grouping of... (3 Replies)
Discussion started by: scriptman237
3 Replies
8. Shell Programming and Scripting
I have two files; file A and file B. I need all the entries of file A to be compared with file B line by line. If the entry exists on file B, then save those on file C; if no then save it on file D
Note :- all the columns of the lines of file A need to be compared, except the last two columns... (8 Replies)
Discussion started by: ajiwww
8 Replies
9. Shell Programming and Scripting
Hi
i want to compare two files and i need the o/p of only difference
here the files
file1
achilles
aedxbepo
aedxbwdm01
aedxbwdm02
albedo
amarice
ambrister
anakin
anton
argon
artephius
asgard
avatar
aymara (10 Replies)
Discussion started by: venikathir
10 Replies
10. Shell Programming and Scripting
Hi
I am a beginner in UNIX and shell scripting and i have a requirement as stated below,
requirement
Login to a unix server 1
1. connect to a database mysql -uUsername -pPassword
2. Select a Schema : "Use Schemaname1"
3. query for a particular record
... (2 Replies)
Discussion started by: Hamdul
2 Replies
LEARN ABOUT OSX
svk::command::log
SVK::Command::Log(3) User Contributed Perl Documentation SVK::Command::Log(3)
NAME
SVK::Command::Log - Show log messages for revisions
SYNOPSIS
log DEPOTPATH
log PATH
log -r N[:M] [DEPOT]PATH
OPTIONS
-r [--revision] ARG : ARG (some commands also take ARG1:ARG2 range)
A revision argument can be one of:
"HEAD" latest in repository
{DATE} revision at start of the date
NUMBER revision number
NUMBER@ interpret as remote revision number
NUM1:NUM2 revision range
Unlike other commands, negative NUMBER has no
meaning.
-l [--limit] REV : stop after displaying REV revisions
-q [--quiet] : Don't display the actual log message itself
-x [--cross] : track revisions copied from elsewhere
-v [--verbose] : print extra information
--xml : display the log messages in XML format
--filter FILTER : select revisions based on FILTER
--output FILTER : display logs using the given FILTER
DESCRIPTION
Display the log messages and other meta-data associated with revisions.
SVK provides a flexible system allowing log messages and other revision properties to be displayed and processed in many ways. This
flexibility comes through the use of "log filters." Log filters are of two types: selection and output. Selection filters determine which
revisions are included in the output, while output filters determine how the information about those revisions is displayed. Here's a
simple example. These two invocations produce equivalent output:
svk log -l 5 //local/project
svk log --filter "head 5" --output std //local/project
The "head" filter chooses only the first revisions that it encounters, in this case, the first 5 revisions. The "std" filter displays the
revisions using SVK's default output format.
Selection filters can be connected together into pipelines. For example, to see the first 3 revisions with log messages containing the
string 'needle', we might do this
svk log --filter "grep needle | head 3" //local/project
That example introduced the "grep" filter. The argument for the grep filter is a valid Perl pattern (with any '|' characters as '|' and
'' as '\'). A revision is allowed to continue to the next stage of the pipeline if the revision's log message matches the pattern. If
we wanted to search only the first 10 revisions for 'needle' we could use either of the following commands
svk log --filter "head 10 | grep needle" //local/project
svk log -l 10 --filter "grep needle" //local/project
You may change SVK's default output filter by setting the SVKLOGOUTPUT environment. See svk help environment for details.
Standard Filters
The following log filters are included with the standard SVK distribution:
Selection : grep, head, author
Output : std, xml
For detailed documentation about any of these filters, try "perldoc SVK::Log::Filter::Name" where "Name" is "Grep", "Head", "XML", etc..
Other log filters are available from CPAN <http://search.cpan.org> by searching for "SVK::Log::Filter". For details on writing log
filters, see the documentation for the SVK::Log::Filter module.
perl v5.10.0 2008-08-04 SVK::Command::Log(3)