10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script called " passwd_status " which gives the passwd-s status of my servers.
the script output is like below
password status for A:
abc ks 10/05/115 1 30 ps
password status for B:
abc ks 09/25/115 1 30 ps
password status for C:
abc ks 10/10/115 1 30 ps
Now , i want to... (1 Reply)
Discussion started by: charanarjun
2. Shell Programming and Scripting
I would need your help to compare dates in my script.
Say if I have the dates in a file I need to comapre these dates with yesterday's date and the dates which are older than yesterday needs to be displayed.
03/12/2012... (1 Reply)
Discussion started by: pdreddy34
3. Shell Programming and Scripting
I need to compare the string variable with input value which have more than one word which also should be case insensitive.
echo "please choose your choice: "
if ` ]
then echo "correct"
but i am getting the output for first word... (3 Replies)
Discussion started by: kalai
4. Shell Programming and Scripting
I want to generate quarter dates using awk or anything, by giving a dates as input
for example :
output should be:
start_date end_date qtr
2010-01-01 2010-03-31 1
2010-04-01 2010-05-31 2
Example 2:... (1 Reply)
Discussion started by: sol_nov
5. Shell Programming and Scripting
I am having difficulty to compare a string in a file against a date from a a table and print the latest date. Below are the values.
String in File : 2009-12-02 00:37:51
Value Table : 2010-01-10-02.00.49.294758
I have to compare both the values ( Ignore the Microsecond in the table... (5 Replies)
Discussion started by: sam_78_nyc
I have written the following Pro*C program to get the difference between 2 dates.But when I am printing the value of the date difference,it is always showing 0.
EXEC SQL BEGIN DECLARE SECTION;
... (4 Replies)
Discussion started by: sureshbabuc
7. Shell Programming and Scripting
var="2009-08-31 12:39:05 UTC"
ddate=`echo $var|cut -d' ' -f1`
y1=`echo $ddate|cut -d'-' -f1`
m1=`echo $ddate|cut -d'-' -f2`
d1=`echo $ddate|cut -d'-' -f3`
if ]; then
echo "$LINE -> $filedate LOWER THAN $currdate"
... (0 Replies)
Discussion started by: HemaV
8. Shell Programming and Scripting
I have thefollowing files in the directory inbox/sat
The above file contains the date of the file creation. We just need to write a ksh shell script to check the... (5 Replies)
Discussion started by: satheesh_color
I am wriitng a shell script to compare a date in `date +%Y%m%d%H%M` to the output of `cat /var/adm/messages.0 | grep Temp |grep "CPU Fans" | cut -f1-4,19 -d' '` which looks like
Dec 2 11:30:57 79
Dec 2 11:37:58 79
Dec 2 11:44:58 79
Dec 2 11:50:59 79
Dec 2 11:58:00 79
Dec 2... (1 Reply)
Discussion started by: Hitesh Shah
10. UNIX for Dummies Questions & Answers
I am trying to compare two dates which are in variables and i am not getting the correct result as expected.
$first_date = '07/19/2007'
Can you please suggest how to i check whether they are equal or not.
if ($first_date -eq $second_date) condition is not... (3 Replies)
Discussion started by: kotasateesh