Sponsored Content
Top Forums Shell Programming and Scripting Help with creating a text file in perl with file creation date. Post 302517437 by mirni on Tuesday 26th of April 2011 07:15:39 PM
Old 04-26-2011
You did not concatenate anything. Even if you did, you'd end up with a '<' instead of a slash between dir and filename.

open() takes a filehandle as a first argument; you are missing that. So the call you need is as follows:
Code:
open(FILE, ">$directory/$filename") || die("Couldn't open file");

The formatting of date you probably want is "%y%m%d", not %M, which would print minute, not month.

Use
Code:
#!/usr/bin/perl -w

; the -w switch turns warnings on; very helpful for debugging.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing Creation Date to a Prespecified Date of a File In Unix

Dear Expert, Is there a command to do that in Unix? In such a way that we don't need to actually "write" or modified the content. -- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies

2. Shell Programming and Scripting

How to get File creation date.

Hi All, I need to get file creation date. I have to access one file who's name is like... abc.log092308 and the date changes as per current date. And i am accessing this file next day. meance in above case i will access above file on 09-24-2008 Also one problem is that this file... (2 Replies)
Discussion started by: Jeevan Salunke
2 Replies

3. Solaris

gzip a file and append creation date stamp to file

I want to gzip a file and append the creation date to the end of the file. How can I accomplish this task. Basically they are log files which need a creation date stamp appended to make sure they do not overwrite other log files. -jack (3 Replies)
Discussion started by: jacktravine
3 Replies

4. Shell Programming and Scripting

how to find creation date of file

Hi, I just need to know way of getting date of file when it was created. eg i have a file abc created on 23 aug. Now i need to know date of file i.e. 23 aug. How can i get that data. Thanks Sarbjit (7 Replies)
Discussion started by: sarbjit
7 Replies

5. Shell Programming and Scripting

finding creation date of a file

Hi, Can anyone tell me a process to find the creation date of a file in a directory. If suppose I have a file in a directory created in 2009 -rw-r--r-- 1 xyz guest 2480 Jul 16 2009 sample.txt The command should return the the file creation date as 16/07/2009 thanks, (2 Replies)
Discussion started by: swathich
2 Replies

6. Shell Programming and Scripting

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies

7. Shell Programming and Scripting

finding the previous day date and creating a file with date

Hi guys, I had a scenario... 1. I had to get the previous days date in yyyymmdd format 2. i had to create a file with Date inthe format yyyymmdd.txt format both are different thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies

8. UNIX for Advanced & Expert Users

Add file creation date as new column

Hi , I have a requirement to append file creation date to each row in a file for all the files in a directory. Please help Thanks, Pavan (2 Replies)
Discussion started by: Pavan Ram B S
2 Replies

9. Shell Programming and Scripting

Script to print file name and its creation date

Hello , I am looking for a script to print file name and its last updated time. FILE CREATION-TIME FILE-NAME 24/10/2017 12:34 TDR-IU-8-2017.10.24.07:40:00-2017.10.24.07:45:00 when we run l command it print the directory and the files with details like permission,... (1 Reply)
Discussion started by: sadique.manzar
1 Replies

10. Shell Programming and Scripting

How to print the specific part of the file name with file creation date?

Hello Folks, I have an requirement, where i need to get total count of the file based on creation date with there filename selected pattern. Filename: MobileProtocol.20171228T154200.157115.udr I want to get the count of files created on each day based on a pattern find. find . -type... (7 Replies)
Discussion started by: sadique.manzar
7 Replies
GENLIB_COPY_UP_ALL_REF.3(October 1, 1997)								 GENLIB_COPY_UP_ALL_REF.3(October 1, 1997)

NAME
GENLIB_COPY_UP_ALL_REF - copy a several physical reference from an instance in the current figure SYNOPSYS
#include <genlib.h> void GENLIB_COPY_UP_ALL_REF(reftype, insname, concatenate) char *reftype, *insname; char concatenate; ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr PARAMETERS
reftype Type of the references to be duplicated insname Name of the instance in the which the references is to be searched for concatenate Indicates whether or not to concatenate the instance name to the references names when copying DESCRIPTION
COPY_UP_ALL_REF duplicates all the references of type reftype of the instance called insname into the current layout cell. The main pur- pose of this function is to copy a set references in the upper hierarchical level, so it can be used as virtual connector, for the data- path router. See dpr(1) for details. The reftype argument can take two values: "ref_con" for virtual connectors "ref_ref" for any other references See the leaf cells design for generators document for details on reference types and usage. The concatenate argument can take two values: AYES indicates that the name of the copied references is concatenated to the instance name. NO implies a direct duplication of the reference name ERRORS
"GENLIB_COPY_UP_ALL_REF impossible : missing GENLIB_DEF_PHFIG" No figure has been yet specified by a call to DEF_PHFIG. So it isn't possible to place a reference inside it. you must call DEF_PHFIG before any other layout action. "illegal getphins : instance insname does not exist" The instance called insname does not currently belong to the figure. "GENLIB_COPY_UP_ALL_REF impossible : references of type reftype do not exist" No reference of type reftype exist in the model of the instance insname. EXAMPLE
#include <genlib.h> main() { /* Create a figure to work on */ GENLIB_DEF_PHFIG("cell"); GENLIB_PLACE("z2l_y", "r1", NOSYM, 23L, 54L); /* Put a reference */ GENLIB_COPY_UP_ALL_REF("ref_con", "r1", NO); /* Save that on disk */ GENLIB_SAVE_PHFIG(); } SEE ALSO
dpr(1), genlib(1), GENLIB_DEF_PHFIG(3), GENLIB_SAVE_PHFIG(3), GENLIB_PHREF(3), GENLIB_COPY_UP_ALL_REF(3), GENLIB_PLACE_CON_REF(3), GEN- LIB_PLACE_SEG_REF(3), GENLIB_PLACE_VIA_REF(3). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. PROCEDURAL GENERATION LANGUAGE
ASIM/LIP6 GENLIB_COPY_UP_ALL_REF.3(October 1, 1997)
All times are GMT -4. The time now is 10:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy