I remember learning that there is a way to make a shell script display the script itself to standard output while the script is being executed but I can't find how to do that. Any pointers? (2 Replies)
Hello everyone,
how can I send output to the screen from a running script or tcl, in such a way that if a loop is executing I will see the rolling counter on my screen as the records are processed in the loop. I do not want the screen to scroll, though. In other words can a var's value be painted... (2 Replies)
Hi,
I am developing a shell script that would install a software when it is run.
I want to displaying Installing <so and so>........ when it is actually installing it.
I want it to be dynamic, in the sense, I want the dots after installing grow and drop.
Is there a way we can do it.... (1 Reply)
Hello friends,
I am a script which dispalys a multiple files with their contents.
for exm:
suppose two file test1.txt and test2.txt.
when I run my script it have to display the below O/P.
test1.txt
-rw-r----- 1 sranga staff 91 Sep 23 02:18 calc.sh
-rw-r----- 1 sranga ... (2 Replies)
Hi ,
I am not familiar with shell programming. I have a requirement like i have two files
.I need to compare the two files by comparing each parameter and i should produce 2 outputs.
1)i have around 35 parameters say i have one parameter name called db_name=dcap in one file and... (7 Replies)
I am executing the following script using 'awk -f process.awk out' where 'out' is the input file which consists of 5000 sequences. Each time it takes one sequence, run the below program by creating a directory, run the mfold command within that directory, running another shell script 'final5' and... (2 Replies)
hi Friends,
I am writing a shell script to extract data from sar logs for my daily analysis.
I have this in sar logs
HP-UX dhpcdbe1 B.11.31 U ia64 05/09/12
01:22:42 device %busy avque r+w/s blks/s avwait avserv
01:27:59 disk30 8.79 13.72 26 427 36.47 ... (3 Replies)
hi friends,
I am working on extracting data from sar logs for analysis.
What is want to do is insert the date. The way i am doing is incrementing the date if i see the hour gets reduced (i.e. from 23 hours to 00 hours). Somehow the script which i have made is not able to handle the logic w.r.t... (3 Replies)
Hi All,
I'm trying to print calendar using shell script and i'm able to print it. But the format is not good.
Here is the script.
#!/bin/bash
echo $(date)
echo "Hello $USER"
echo Hostname $(hostname)
echo Working in $(pwd)
echo Here is this month calender
echo $(cal)
$ sh first.sh... (7 Replies)
Discussion started by: chandrakanth
7 Replies
LEARN ABOUT PHP
datetime.setdate
DATETIME.SETDATE(3) 1 DATETIME.SETDATE(3)DateTime::setDate - Sets the date
Object oriented style
SYNOPSIS
public DateTime DateTime::setDate (int $year, int $month, int $day)
DESCRIPTION
Procedural style
DateTime date_date_set (DateTime $object, int $year, int $month, int $day)
Resets the current date of the DateTime object to a different date.
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $year
- Year of the date.
o $month
- Month of the date.
o $day
- Day of the date.
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Changed the return value on success from NULL to |
| | DateTime. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
DateTime.setDate(3) example
Object oriented style
<?php
$date = new DateTime();
$date->setDate(2001, 2, 3);
echo $date->format('Y-m-d');
?>
Procedural style
<?php
$date = date_create();
date_date_set($date, 2001, 2, 3);
echo date_format($date, 'Y-m-d');
?>
The above examples will output:
2001-02-03
Example #2
Values exceeding ranges are added to their parent values
<?php
$date = new DateTime();
$date->setDate(2001, 2, 28);
echo $date->format('Y-m-d') . "
";
$date->setDate(2001, 2, 29);
echo $date->format('Y-m-d') . "
";
$date->setDate(2001, 14, 3);
echo $date->format('Y-m-d') . "
";
?>
The above example will output:
2001-02-28
2001-03-01
2002-02-03
SEE ALSO DateTime.setISODate(3), DateTime.setTime(3).
PHP Documentation Group DATETIME.SETDATE(3)