Sponsored Content
Top Forums Shell Programming and Scripting How to print the specific part of the file name with file creation date? Post 303011433 by sadique.manzar on Thursday 18th of January 2018 08:39:52 AM
Old 01-18-2018
here is the output now i am getting:

Code:
1649 2017-12-28 20171228
 499 2017-12-30 udr
   1 2017-12-31 udr
   1 2018-01-01 udr
   1 2018-01-02 udr
   1 2018-01-05 udr
   1 2018-01-07 udr
   2 2018-01-10 udr
   5 2018-01-11 udr

---------- Post updated at 08:31 AM ---------- Previous update was at 08:17 AM ----------


What if I have multiple files with different pattern at the same place.
How will I implement that.

---------- Post updated at 08:39 AM ---------- Previous update was at 08:31 AM ----------


@RudiC and @ rdrtx1 Please reply.

@RudiC your command is giving the output like below:

Code:
1649 2017-12-28 20171228
499 2017-12-30 udr
1 2017-12-31 udr
1 2018-01-01 udr
1 2018-01-02 udr
1 2018-01-05 udr
1 2018-01-07 udr
2 2018-01-10 udr
5 2018-01-11 udr

Where I want 20171228 instead of every udr.
Kindly guide.

Last edited by rbatte1; 01-18-2018 at 10:14 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

file creation date including seconds

Hi, Is anybody can help me to get the file creation date with seconds? -rw-r--r-- 1 opsc system 422550845 Aug 22 15:41 StatData.20020821 Thanks in advance Krishna (7 Replies)
Discussion started by: krishna
7 Replies

2. UNIX for Dummies Questions & Answers

file creation date & time

Hi All, I have some files which are creates every day using a script. I want to create a log files which does write "filename,creation day and time" how can I do this ?? Alice (3 Replies)
Discussion started by: alisevA3
3 Replies

3. 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

4. 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

5. 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

6. 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

7. 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

8. Shell Programming and Scripting

Help with creating a text file in perl with file creation date.

Hi, I am quite new to Perl scripting and i need to create a .TXT file using perl, with fields (A,B,C,D,E), and this text file should be named with current file creation date "XYZ_CCYYMMDD.TXT" (i.e.XYZ_2011042514:33 PM). Can anyone who has done this, please share their expertise on this... (5 Replies)
Discussion started by: msrahman
5 Replies

9. Shell Programming and Scripting

[Solved] Printing a part of the last line of the specific part of a file

Hi, I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this: Name =A xxxxxx yyyyyy zzzzzz aaaaaa bbbbbb Value = 57 This is necessary because in a file there are written more lines which... (6 Replies)
Discussion started by: wenclu
6 Replies

10. 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
Courriel::Header::Disposition(3pm)			User Contributed Perl Documentation			Courriel::Header::Disposition(3pm)

NAME
Courriel::Header::Disposition - The content disposition for an email part VERSION
version 0.29 SYNOPSIS
my $disp = $part->content_disposition(); print $disp->is_inline(); print $disp->is_attachment(); print $disp->filename(); my %attr = $disp->attributes(); while ( my ( $k, $v ) = each %attr ) { print "$k => $v "; } DESCRIPTION
This class represents the contents of a "Content-Disposition" header attached to an email part. Such headers indicate whether or not a part should be considered an attachment or should be displayed to the user directly. This header may also include information about the attachment's filename, creation date, etc. Here are some typical headers: Content-Disposition: inline Content-Disposition: multipart/alternative; boundary=abcdefghijk Content-Disposition: attachment; filename="Filename.jpg" Content-Disposition: attachment; filename="foo-bar.jpg"; creation-date="Tue, 31 May 2011 09:41:13 -0700" API
This class supports the following methods: Courriel::Header::Disposition->new_from_value( ... ) This takes two parameters, "name" and "value". The "name" is optional, and defaults to "Content-Disposition". The "value" is parsed and split up into the disposition and attributes. Courriel::Header::Disposition->new( ... ) This method creates a new object. It accepts the following parameters: o name This defaults to 'Content-Type'. o value This is the full header value. o disposition This should usually either be "inline" or "attachment". In theory, the RFCs allow other values. o attributes A hash reference of attributes from the header, such as a filename, creation date, size, etc. The keys are attribute names and the values can either be strings or Courriel::HeaderAttribute objects. Values which are strings will be inflated into objects by the constructor. This is optional, and can be an empty hash reference or omitted entirely. $ct->name() The header name, usually "Content-Disposition". $ct->value() The raw header value. $disp->disposition() Returns the disposition value passed to the constructor. $disp->is_inline() Returns true if the disposition is not equal to "attachment". $disp->is_attachment() Returns true if the disposition is equal to "attachment". $disp->filename() Returns the filename found in the attributes, or "undef". $disp->creation_datetime(), $disp->last_modified_datetime(), $disp->read_datetime() These methods look for a corresponding attribute ("creation-date", etc.) and return a DateTime object representing that attribute's value, if it exists. $disp->attributes() Returns a hash (not a reference) of the attributes passed to the constructor. Attributes are Courriel::HeaderAttribute objects. The keys of the hash are all lower case, though the original casing is preserved in the "name()" returned by the Courriel::HeaderAttribute object. $disp->attribute($key) Given a key, returns the named Courriel::HeaderAttribute object. Obviously, this value can be "undef" if the attribute doesn't exist. Name lookup is case-insensitive. $disp->attribute_value($key) Given a key, returns the named attribute's value as a string. Obviously, this value can be "undef" if the attribute doesn't exist. Name lookup is case-insensitive. The attribute is a Courriel::HeaderAttribute object. $disp->as_header_value() Returns the object as a string suitable for a header value (but not folded). EXTENDS
This class extends Courriel::Header. ROLES
This class does the Courriel::Role::HeaderWithAttributes role. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) perl v5.14.2 2012-03-07 Courriel::Header::Disposition(3pm)
All times are GMT -4. The time now is 09:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy