Shell script for Creating Directory with name as system date


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script for Creating Directory with name as system date
# 8  
Old 12-07-2005
thankyou very much for correcting ..... its working .... Raju for yesterday only , this small thing was creating problem..... I really apperitiate you for correcting me.

thanx very much ..... All :-))
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

How to calculate the quarter end date according to the current date in shell script?

Hi, My question is how to calculate the quarter end date according to the current date in shell script? (2 Replies)
Discussion started by: Divya_1234
2 Replies

2. Answers to Frequently Asked Questions

Compare date in .txt with system date and remove if it's lesser than system date

I m working on shell scripting and I m stuck where in my .txt file there is column as expiry date and I need to compare that date with system date and need to remove all the rows where expiry date is less than system date and create a new .txt with update. (1 Reply)
Discussion started by: Stuti
1 Replies

3. UNIX for Beginners Questions & Answers

Compare date in .txt with system date and remove if it's lesser than system date

Can someone help me with the code wherein there is a file f1.txt with different column and 34 column have expiry date and I need to get that and compare with system date and if expiry date is <system date remove those rows and other rows should be moved to new file f2.txt . I don't want to delete... (2 Replies)
Discussion started by: Stuti
2 Replies

4. UNIX for Dummies Questions & Answers

Creating a directory based on date

I want to create a directory based on date. I do not have date -d command. What I do have is: either use "date" command to get current date or DATE1=$(perl -e 'print scalar(localtime(time - 1 )), "\n";' |awk '{print $2,$3,$5}') |awk '{print $3}'can be modified to produce the desired year.... (3 Replies)
Discussion started by: newbie2010
3 Replies

5. Homework & Coursework Questions

Creating a .profile, displaying system variables, and creating an alias

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Here is what I am supposed to do, word for word from my assignment page: 1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies

6. Programming

Script for creating a directory & move the .tif files in it.

Hi Team, I have thousands of TIF files which are converted from PDF. Below is a sample of it. LH9406_BLANCARAMOS_2012041812103210320001.tif LH9406_BLANCARAMOS_2012041812103210320002.tif LH9406_BLANCARAMOS_2012041812103210320003.tif LH9411_ANGENIAHUTCHINSON_2012041812102510250001.tif... (9 Replies)
Discussion started by: paragnehete
9 Replies

7. Shell Programming and Scripting

Creating a directory if its non-existent within a script

Hi, is there a way to create a directory when its non-existent when trying to move files to this particular folder? Thanks much. (7 Replies)
Discussion started by: ida1215
7 Replies

8. Shell Programming and Scripting

How to increment a user defined date value in the DATE format itself using shell script?

I need to increment a date value through shell script. Input value consist of start date and end date in DATE format of unix. For eg. I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr. The output must look like 1/1/09 2/2/09 . . . 31/1/09 . . 1/2/09 . 28/2/09... (1 Reply)
Discussion started by: sunil087
1 Replies

9. Shell Programming and Scripting

Creating date directory and moving files into that directory

I have list of files named file_username_051208_025233.log. Here 051208 is the date and 025233 is the time.I have to run thousands of files daily.I want to put all the files depending on the date of running into a date directory.Suppose if we run files today they should put into 05:Dec:08... (3 Replies)
Discussion started by: ravi030
3 Replies

10. Shell Programming and Scripting

shell script to selectively tar directory based on date

hye everybody :) , i'm new to the scripting world.. hope you guys can help me out with this one.. i'm trying to identify any directory under /tmp/saya that is created more than one day from the current date.. e.g, today is March 14, so any directory that has time stamp March 13 backwards, i... (2 Replies)
Discussion started by: fara_aris
2 Replies
Login or Register to Ask a Question
DATETIME.SETTIME(3)							 1						       DATETIME.SETTIME(3)

DateTime::setTime - Sets the time

       Object oriented style

SYNOPSIS
public DateTime DateTime::setTime (int $hour, int $minute, [int $second]) DESCRIPTION
Procedural style DateTime date_time_set (DateTime $object, int $hour, int $minute, [int $second]) Resets the current time of the DateTime object to a different time. PARAMETERS
o $object -Procedural style only: A DateTime object returned by date_create(3). The function modifies this object. o $hour - Hour of the time. o $minute - Minute of the time. o $second - Second of the time. 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.setTime(3) example Object oriented style <?php $date = new DateTime('2001-01-01'); $date->setTime(14, 55); echo $date->format('Y-m-d H:i:s') . " "; $date->setTime(14, 55, 24); echo $date->format('Y-m-d H:i:s') . " "; ?> Procedural style <?php $date = date_create('2001-01-01'); date_time_set($date, 14, 55); echo date_format($date, 'Y-m-d H:i:s') . " "; date_time_set($date, 14, 55, 24); echo date_format($date, 'Y-m-d H:i:s') . " "; ?> The above examples will output something similar to: 2001-01-01 14:55:00 2001-01-01 14:55:24 Example #2 Values exceeding ranges are added to their parent values <?php $date = new DateTime('2001-01-01'); $date->setTime(14, 55, 24); echo $date->format('Y-m-d H:i:s') . " "; $date->setTime(14, 55, 65); echo $date->format('Y-m-d H:i:s') . " "; $date->setTime(14, 65, 24); echo $date->format('Y-m-d H:i:s') . " "; $date->setTime(25, 55, 24); echo $date->format('Y-m-d H:i:s') . " "; ?> The above example will output: 2001-01-01 14:55:24 2001-01-01 14:56:05 2001-01-01 15:05:24 2001-01-02 01:55:24 SEE ALSO
DateTime.setDate(3), DateTime.setISODate(3). PHP Documentation Group DATETIME.SETTIME(3)