Sponsored Content
Top Forums Shell Programming and Scripting urgent help needed in telnet issue Post 302268803 by Ikon on Tuesday 16th of December 2008 10:36:37 AM
Old 12-16-2008
Thread is over a year old, (12-02-07).. :P Hope they got it figured out by now.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

urgent help needed !!

i have a script, which is continuously looping. i want to view the script name when i use ps command... it is only showing -sh ... UID PID PPID C STIME TTY TIME COMMAND informix 8533 20923 0 18:19:28 pts/ta 0:00 -sh but i dont have my scriptname displayed .... how can i do that my script is... (0 Replies)
Discussion started by: guhas
0 Replies

2. Shell Programming and Scripting

ftp and telnet in the same script ?? Urgent Help !!

Hi All, I have written a script which ftp certain file to other machine and as the ftp completes , I want to connect to that machine ( at which the file is ftped) . Now the problem is that my script ftp's the file but it does not telnet to that machine. Suppose I am at machine1 and I want to... (11 Replies)
Discussion started by: aarora_98
11 Replies

3. Shell Programming and Scripting

urgent help needed.

Ok I admit it I am stumped and I would appreciate any and all help Here is what I am trying to do. Korn Shell script I am setting a variable to another shell script that I want to invoke in my main script like so: GETDIR=/vol100/cfg/.getdir The .getdir shell script take a parameter,... (4 Replies)
Discussion started by: Batch
4 Replies

4. UNIX for Dummies Questions & Answers

Urgent help needed

Hi I am using DB2 as the database and i am reading syscat.columns from the database. I want to manipulate the rows returned by running SQL query from the shell script. The manipulation involves addition and deletion of the rows from the resultset. All the above i want to do using SQL... (5 Replies)
Discussion started by: skyineyes
5 Replies

5. Shell Programming and Scripting

urgent needed

hi i want solution regarding usage of array. i m having code which is written using if- elif and can i use or access using arrays. here i wana use array values along with if -elif condition. i dnt wana use command line argument parameter1=(scram no_scram) if ; then ... (0 Replies)
Discussion started by: manish1
0 Replies

6. Shell Programming and Scripting

Urgent Telnet Script

hi all, I want to telnet to a port. aand then run a command called 'show threads' once i'm connected to the telnet prompt. then the respond of this 'show threads' i want to store it in a file on a local system. can someone please help me out here? this needs to be scripted, shell script. ... (1 Reply)
Discussion started by: SkySmart
1 Replies

7. UNIX for Dummies Questions & Answers

Urgent Help Needed

Hello Friends, I am a Graduate in Computers. I completed BCA degree this year. I want to make my career in UNIX. But, unfortunately I don't know anybody who can guide me. I am totally confuse because I don't know where to start and what are the future prospect in UNIX. Please give your... (4 Replies)
Discussion started by: Luckyless
4 Replies

8. Shell Programming and Scripting

Urgent Help needed please

Hi, I have a small grepping problem in my script.I am having a file from which i need to make sure "#^A17" is the last updation (Next # can be ignored) before ################.The idea behind this is, if this file contains "A17" as the last updation, i need to do a particular activity. please... (7 Replies)
Discussion started by: Renjesh
7 Replies

9. Red Hat

Help needed in fixing port issue - Urgent

Hi, One of our web application is running in Linux and using apache web servers. Application is hosted in port 4080 (for soap requests) and port 9999, and its serving behind a vip and cname. Initially it was working fine in another server and recently (2 months back) we have moved to the new... (4 Replies)
Discussion started by: senor.ram
4 Replies

10. Programming

URGENT HELP NEEDED

KING KONG ELECTRICITY AUTHORITY BILL CALCULATOR You are required to develop a script that will enable KING KONG ELECTRICITY AUTHORITY to calculate customer bills based on their meter readings. The customers are categorized into the following categories:  Residential customers  Commercial... (1 Reply)
Discussion started by: watisevil
1 Replies
EASTER_DATE(3)								 1							    EASTER_DATE(3)

easter_date - Get Unix timestamp for midnight on Easter of a given year

SYNOPSIS
int easter_date ([int $year = date("Y")]) DESCRIPTION
Returns the Unix timestamp corresponding to midnight on Easter of the given year. Warning This function will generate a warning if the year is outside of the range for Unix timestamps (i.e. before 1970 or after 2037). The date of Easter Day was defined by the Council of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. The Equinox is assumed to always fall on 21st March, so the calculation reduces to determining the date of the full moon and the date of the following Sunday. The algorithm used here was introduced around the year 532 by Dionysius Exiguus. Under the Julian Calendar (for years before 1753) a simple 19-year cycle is used to track the phases of the Moon. Under the Gregorian Calendar (for years after 1753 - devised by Clavius and Lilius, and introduced by Pope Gregory XIII in October 1582, and into Britain and its then colonies in September 1752) two correction factors are added to make the cycle more accurate. PARAMETERS
o $year - The year as a number between 1970 an 2037. If omitted, defaults to the current year according to the local time. RETURN VALUES
The easter date as a unix timestamp. EXAMPLES
Example #1 easter_date(3) example <?php echo date("M-d-Y", easter_date(1999)); // Apr-04-1999 echo date("M-d-Y", easter_date(2000)); // Apr-23-2000 echo date("M-d-Y", easter_date(2001)); // Apr-15-2001 ?> NOTES
Note easter_date(3) relies on your system's C library time functions, rather than using PHP's internal date and time functions. As a con- sequence, easter_date(3) uses the TZ environment variable to determine the time zone it should operate in, rather than using PHP's default time zone, which may result in unexpected behaviour when using this function in conjunction with other date functions in PHP. As a workaround, you can use the easter_days(3) with DateTime and DateInterval to calculate the start of Easter in your PHP time zone as follows: <?php function get_easter_datetime($year) { $base = new DateTime("$year-03-21"); $days = easter_days($year); return $base->add(new DateInterval("P{$days}D")); } foreach (range(2012, 2015) as $year) { printf("Easter in %d is on %s ", $year, get_easter_datetime($year)->format('F j')); } ?> The above example will output: Easter in 2012 is on April 8 Easter in 2013 is on March 31 Easter in 2014 is on April 20 Easter in 2015 is on April 5 SEE ALSO
easter_days(3) for calculating Easter before 1970 or after 2037 . PHP Documentation Group EASTER_DATE(3)
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy