Sponsored Content
Top Forums Shell Programming and Scripting Help Needed in Date Condition !! Post 302179654 by ranga27 on Friday 28th of March 2008 09:24:37 AM
Old 03-28-2008
Yeah it is a question !! i tried to run the above shell script .. It was able to Print " No Values Present "

But here are the issues ::

1)It is not able to break the loop once it prints "No Values Present " . Since i have some shell written after that Perl statements

2) i am not able to send any Email with the subject as " NO key values are Present ""
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help needed on Date command

Hi, I am facing one problem with date command.Actually I want to use this command to get the last month,not the current month..OK,I can do current month - 1 and give special condition for january,But this time i need last month as strings like January,februaury,march etc... There is option... (5 Replies)
Discussion started by: nikunj
5 Replies

2. Shell Programming and Scripting

help needed in date format

i need to grep date in the format year-month-day,,,,,,, actually i need to grep those dates other than current date.......... can anyone help me in this...........i need a format of date which would grep previous date except current date (1 Reply)
Discussion started by: ali560045
1 Replies

3. UNIX for Dummies Questions & Answers

Help needed with date

How can i assign a variable by the name of CUTDATE= today date - 90 days? i have something like this right now :- today=`date '+%Y%m%d'` #cutdate = this is where i am having problem. i need today - 90 days How can i accomplish this? After that i need to do delete the data which are more... (16 Replies)
Discussion started by: chris1234
16 Replies

4. Shell Programming and Scripting

Help needed-calculate previous date

Hi Friends, Need a command/script in unix which calculates previous date from current date. For ex: If current date= 01 Jan 2008, then output =31 Dec 2007 If current_date =01 Aug 2008 , then output= 31 July 2008 Please advice Regards, Suresh (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

5. Shell Programming and Scripting

writing condition using date stamp

Hi all, I am writing a script which i am executing using nohup command. while ( true ) do RequiredTime=06:00:00 SysTime=`echo $(date) | awk '{print $4}'` if ]; then body of script fi done this is executing 3 times at 6am. i want it execute the body of script... (3 Replies)
Discussion started by: firestar
3 Replies

6. Shell Programming and Scripting

If(Condition) Rename a file with (Date+Time) Stamp

Hi! Please see our current script: #!/usr/bin/ksh if (egrep "This string is found in the log" /a01/bpm.log) then mailx -s "Error from log" me@email.com, him@email.com </a01/bpm.log fi To the above existing script, we need to add the following change: 1) After finding the string,... (7 Replies)
Discussion started by: atechcorp
7 Replies

7. UNIX for Dummies Questions & Answers

Help needed - How to use or condition in makefile

Hi All, i get struck in between how to use OR condition in makefile. Eg: ifeq ($(PACKAGE),x) LIBS += $(STRIPPED_LIB-ONLY) else ifeq ($(PACKAGE),y) LIBS += $(STRIPPED_LIB-ONLY) else LIBS += $(LIB-ONLY) endif endif so if we look into above... (1 Reply)
Discussion started by: dhanavel
1 Replies

8. UNIX for Dummies Questions & Answers

date command option e Help needed please!!

Hi All, I was trying to get the date in format "Feb2" I tried option "e" giving me a padded space and getting the result as "Feb 2". Though its working fine for dates 10 to 31. Please suggest me how to get rid of this space before date. Thanks Olivia (4 Replies)
Discussion started by: Olivia
4 Replies

9. Shell Programming and Scripting

Help needed with some date arithmetic

I have a file (main.lst) containing a list of dates in DDMMYYYY format. The dates will mostly be the same but it is possible to have multiple dates and these need not be in chronological order. I have another file containing another list of dates (holidays.lst). The task is to get the latest... (5 Replies)
Discussion started by: elixir_sinari
5 Replies

10. Shell Programming and Scripting

Help needed with date compare

Hello, I have this unix script which selects rows from DB where current time is greater than expired time (column). So this will give all the records that are expired 1 day ago, 2 days ago, 3 days ago, etc.. I need help modifying in such that it should give records that are only expired 1 day... (5 Replies)
Discussion started by: jakSun8
5 Replies
UI::Dialog(3pm) 					User Contributed Perl Documentation					   UI::Dialog(3pm)

NAME
UI::Dialog SYNOPSIS
use UI::Dialog; my $d = new UI::Dialog ( backtitle => 'Demo', title => 'Default', height => 20, width => 65 , listheight => 5, order => [ 'zenity', 'xdialog' ] ); # Either a Zenity or Xdialog msgbox widget should popup, # with a preference for Zenity. $d->msgbox( title => 'Welcome!', text => 'Welcome one and all!' ); ABSTRACT
UI::Dialog is a OOPerl wrapper for the various dialog applications. These dialog backends are currently supported: Zenity, XDialog, GDia- log, KDialog, CDialog, and Whiptail. There is also an ASCII backend provided as a last resort interface for the console based dialog vari- ants. UI::Dialog is a class that provides a strict interface to these various backend modules. By using UI:Dialog (with it's imposed limi- tations on the widgets) you can ensure that your Perl program will function with any available interfaces. DESCRIPTION
UI::Dialog supports priority ordering of the backend detection process. So if you'd prefer that Xdialog should be used first if available, simply designate the desired order when creating the new object. The default order for detecting and utilization of the backends are as follows: (with DISPLAY env): Zenity, GDialog, XDialog, KDialog (without DISPLAY): CDialog, Whiptail, ASCII UI::Dialog is the result of a complete re-write of the UDPM CPAN module. This was done to break away from the bad choice of name (User- DialogPerlModule) and to implement a cleaner, more detached, OOPerl interface. EXPORT
None INHERITS
None CONSTRUCTOR
new( @options ) EXAMPLE my $d = new( title => 'Default Title', backtitle => 'Backtitle', width => 65, height => 20, listheight => 5, order => [ 'zenity', 'xdialog', 'gdialog' ] ); DESCRIPTION This is the Class Constructor method. It accepts a list of key => value pairs and uses them as the defaults when interacting with the various widgets. RETURNS A blessed object reference of the UI::Dialog class. OPTIONS The (...)'s after each option indicate the default for the option. An * denotes support by all the widget methods on a per-use policy defaulting to the values decided during object creation. debug = 0,1,2(0) order = [ zenity, xdialog, gdialog, kdialog, cdialog, whiptail, ascii ] (as indicated) PATH = [ /bin, /usr/bin, /usr/local/bin, /opt/bin ] (as indicated) backtitle = "backtitle" ('') * title = "title" ('') * beepbefore = 0,1(0) * beepafter = 0,1(0) * height = d+(20) * width = d+(65) * listheight = d+(5) * STATE METHODS
state( ) EXAMPLE if ($d->state() eq "OK") { $d->msgbox( text => "that went well" ); } DESCRIPTION Returns the state of the last dialog widget command. The value can be one of "OK", "CANCEL", "ESC". The return data is based on the exit codes (return value) of the last widget displayed. RETURNS a single SCALAR. ra( ) EXAMPLE my @array = $d->ra(); DESCRIPTION Returns the last widget's data as an array. RETURNS an ARRAY. rs( ) EXAMPLE my $string = $d->rs(); DESCRIPTION Returns the last widget's data as a (possibly multiline) string. RETURNS a SCALAR. rv( ) EXAMPLE my $string = $d->rv(); DESCRIPTION Returns the last widget's exit status, aka: return value. RETURNS a SCALAR. WIDGET METHODS
yesno( ) EXAMPLE if ($d->yesno( text => 'A binary type question?') ) { # user pressed yes } else { # user pressed no or cancel } DESCRIPTION Present the end user with a message box that has two buttons, yes and no. RETURNS TRUE(1) for a response of YES or FALSE(0) for anything else. msgbox( ) EXAMPLE $d->msgbox( text => 'A simple message' ); DESCRIPTION Pesent the end user with a message box that has an OK button. RETURNS TRUE(1) for a response of OK or FALSE(0) for anything else. inputbox( ) EXAMPLE my $string = $d->inputbox( text => 'Please enter some text...', entry => 'this is the input field' ); DESCRIPTION Present the end user with a text input field and a message. RETURNS a SCALAR if the response is OK and FALSE(0) for anything else. password( ) EXAMPLE my $string = $d->password( text => 'Enter some hidden text.' ); DESCRIPTION Present the end user with a text input field, that has hidden input, and a message. Note that the GDialog backend will provide a regular inputbox instead of a password box because gdialog doesn't support pass- words. GDialog is on it's way to the proverbial software heaven so this isn't a real problem. Use Zenity instead :) RETURNS a SCALAR if the response is OK and FALSE(0) for anything else. textbox( ) EXAMPLE $d->textbox( path => '/path/to/a/text/file' ); DESCRIPTION Present the end user with a simple scrolling box containing the contents of the given text file. RETURNS TRUE(1) if the response is OK and FALSE(0) for anything else. menu( ) EXAMPLE my $selection1 = $d->menu( text => 'Select one:', list => [ 'tag1', 'item1', 'tag2', 'item2', 'tag3', 'item3' ] ); DESCRIPTION Present the user with a selectable list. RETURNS a SCALAR of the chosen tag if the response is OK and FALSE(0) for anything else. checklist( ) EXAMPLE my @selection1 = $d->checklist( text => 'Select one:', list => [ 'tag1', [ 'item1', 0 ], 'tag2', [ 'item2', 1 ], 'tag3', [ 'item3', 1 ] ] ); DESCRIPTION Present the user with a selectable checklist. RETURNS an ARRAY of the chosen tags if the response is OK and FALSE(0) for anything else. radiolist( ) EXAMPLE my $selection1 = $d->radiolist( text => 'Select one:', list => [ 'tag1', [ 'item1', 0 ], 'tag2', [ 'item2', 1 ], 'tag3', [ 'item3', 0 ] ] ); DESCRIPTION Present the user with a selectable radiolist. RETURNS a SCALAR of the chosen tag if the response is OK and FALSE(0) for anything else. fselect( ) EXAMPLE my $text = $d->fselect( path => '/path/to/a/file/or/directory' ); DESCRIPTION Present the user with a file selection widget preset with the given path. RETURNS a SCALAR if the response is OK and FALSE(0) for anything else. dselect( ) EXAMPLE my $text = $d->dselect( path => '/path/to/a/file/or/directory' ); DESCRIPTION Present the user with a file selection widget preset with the given path. Unlike fselect() this widget will only return a directory selection. RETURNS a SCALAR if the response is OK and FALSE(0) for anything else. SEE ALSO
PERLDOC UI::Dialog::GNOME UI::Dialog::KDE UI::Dialog::Console UI::Dialog::Backend UI::Dialog::Backend::ASCII UI::Dialog::Backend::CDialog UI::Dialog::Backend::GDialog UI::Dialog::Backend::KDialog UI::Dialog::Backend::Nautilus UI::Dialog::Backend::Whiptail UI::Dialog::Backend::XDialog UI::Dialog::Backend::XOSD UI::Dialog::Backend::Zenity MAN FILES dialog(1), whiptail(1), zenity(1), gdialog(1), Xdialog(1), osd_cat(1), kdialog(1) and nautilus(1) BUGS
Please email the author with any bug reports. Include the name of the module in the subject line. AUTHOR
Kevin C. Krinke, <kckrinke@opendoorsoftware.com> COPYRIGHT AND LICENSE
Copyright (C) 2004 Kevin C. Krinke <kckrinke@opendoorsoftware.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA perl v5.8.8 2004-08-01 UI::Dialog(3pm)
All times are GMT -4. The time now is 04:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy