Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Creating a file with the date in it Post 2373 by n9ninchd on Wednesday 9th of May 2001 01:29:51 PM
Old 05-09-2001
Thank You to the both of you.
Both scenarios work well, and both work in the areas that I needed.

Once again thank you so much
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating file with date/timestamp in it

I need to create a file through a c-shell script which contains only the date and time that the file was created. Does anyone know a simple way to do this? Thank you, Paula (7 Replies)
Discussion started by: ccpjr29
7 Replies

2. Shell Programming and Scripting

Shell script for Creating Directory with name as system date

Dear Sir/Madam, I need a bit of your help. The problem is as follows : I have to create a directory in unix whose name is that of system date in the dd_mon_yyyy format . I am able to extract a date in required format ina variable , but when i'm using this variable in mkdir it is not... (7 Replies)
Discussion started by: aarora_98
7 Replies

3. Shell Programming and Scripting

creating a new file with date stamp

Hi, can any one tell me how to achieve this...I will input the path and file name and it should rename it to current date and time... this is what I tried... #! /usr/bin/sh set -x cd /info_stg/vul/Scripts TODAY_DATE_TIME=`date +%Y%m%d%H%M%S` IN_FILE_PATH=`cat file.txt | awk -F, '{... (2 Replies)
Discussion started by: mgirinath
2 Replies

4. Shell Programming and Scripting

Need help on creating a file everday with current date

Hi Friends/Team, I have written a small script but I dont understand what is the mistake in this one.. please help me identify and correct it. file="touch `date +%b_%d`" for i in $(cat /home/gmanju/servers) do echo $i >>file remsh $i cat /var/opt/omni/server/log/opcmsg.log | grep -i... (1 Reply)
Discussion started by: gmanjunathbe
1 Replies

5. Shell Programming and Scripting

Creating a date (without time) in perl

I have a perl script that automatically runs on Mondays. I need to have it create a variable for last Monday's date thru that Sunday's date. example: 04-01-2011 thru 04-08-2011 Its reporting numbers for the previous week beginning with Monday and ending on Sunday. So i dont have to go in... (7 Replies)
Discussion started by: bbraml
7 Replies

6. Shell Programming and Scripting

creating a file name based on date

I need to automate a weekly process of piping a directory list to a csv file. Normally I do ls -l > files_04182010.csv (04182010 being the date..) Can someome show me how I would script this, so that when the script is ran it grabs the current date and formats it and allows me to use that... (8 Replies)
Discussion started by: jeffs42885
8 Replies

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

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

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

10. UNIX for Beginners Questions & Answers

Creating dir with date and then increment by 1

Hi, I can't seem to do this or find how to do it. Can someone please help: I have a dir and within it I have dirs with date name example Test1/ 2017-08-12 2017-09-13 2017-10-14 2017-11-15 2017-11-16 what I want is a a script to scan the above and then take 2017-11-16 and increase this... (10 Replies)
Discussion started by: israr75
10 Replies
ar(5)								File Formats Manual							     ar(5)

Name
       ar - archive (library) file format

Syntax
       #include <ar.h>

Description
       The archive command, combines several files into one.  Archives are used mainly as libraries to be searched by the link-editor,

       A  file	produced  by has a magic string at the start, followed by the constituent files, each preceded by a file header.  The magic number
       and header layout as described in the include file are:
       #define ARMAG  "!<arch>
"
       #define SARMAG 8

       #define ARFMAG "`
"

       struct ar_hdr {
	       char   ar_name[16];
	       char   ar_date[12];
	       char   ar_uid[6];
	       char   ar_gid[6];
	       char   ar_mode[8];
	       char   ar_size[10];
	       char   ar_fmag[2];
       };

       The name is a blank-padded string.  The ar_fmag field contains ARFMAG to help verify the presence of a header.  The other fields are  left-
       adjusted, blank-padded numbers.	They are decimal except for ar_mode, which is octal.  The date is the modification date of the file at the
       time of its insertion into the archive.

       Each file begins on an even (0 mod 2) boundary; a new-line is inserted between files if necessary.  The size given reflects the actual size
       of the file exclusive of padding.

       Provisions are not made for empty areas in an archive file.

       The encoding of the header is portable across machines.	If an archive contains printable files, the archive itself is printable.

Restrictions
       A filename loses trailing blanks.  Most software dealing with archives takes an included blank as a name terminator.

See Also
       ar(1), ld(1), nm(1)

								       RISC								     ar(5)
All times are GMT -4. The time now is 08:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy