The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Obtaining Security Clearance dangral What's on Your Mind? 6 02-03-2005 01:20 PM
Obtaining Process information on AIX StuBob High Level Programming 0 01-05-2005 07:13 AM
Obtaining A Process ID (PID) 1cuervo UNIX for Advanced & Expert Users 7 11-05-2001 12:36 AM
Obtaining IP address Raael IP Networking 1 05-31-2001 02:12 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-26-2006
johnray31 johnray31 is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 8
obtaining a particular day

hello guys am totally new to this script programming so help me
i want to write a script that obtain a particular day and schedule a task that day at particular time .. my problem is i don't know to get time and particular day in script ...

2.
how i ll print the time taken by executing a command in shell script


#. how i ll check that letter is in small casr or in capital case

plz let me know this

thankx
  #2 (permalink)  
Old 07-26-2006
tayyabq8's Avatar
tayyabq8 tayyabq8 is offline Forum Advisor  
Moderator
  
 

Join Date: Nov 2004
Location: Bahrain
Posts: 579
To check letter if its capital or small:
Code:
#! /bin/ksh
letter=A
if [[ $letter == [a-z] ]]; then
    echo "small"
else
    echo "CAPITAL"
fi

Regards,
Tayyab
  #3 (permalink)  
Old 07-26-2006
Henk Trumpie Henk Trumpie is offline
Registered User
  
 

Join Date: Mar 2004
Posts: 1
Date stamp:

format:
#!/bin/ksh

DAY=`date +%y%m%d`

When you echo $DAY, the output is 060726

When you want to add a TIMESONE to your DAY stamp, you will need to do the following:

first, on command line type the command "date"...This will show you your time zone

In you DAY string, change it to the following:
DAY=`TZ=GMT date +%y%m%d`

Now you can start playing around with the DAY parameter...You can go ahead a day or two, or backwards....

example:
DAY=`TZ=GMT+24 date +%y%m%d`

Output:
060725

The + will take you back....If you specify a -, it will take you forward...

Regards
Henk
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0