Example file list The Script
I've read somewhere on this forum that when doing an ls -l command, files that are older than 6 months will be displayed (Mmm dd yyyy) as opposed to (Mmm dd hh:ss). My script doesn't account for this.
Hi,
i have a script that stores the date in a variable as follows:
DATESTAMP=`date +"%m%d%Y"`
I also have another file called HOLIDAYFILE which stores all of our holidays as follows:
01/01/2007
07/04/2007
What i need to do is use the grep statement in my script to see if DATESTAMP... (2 Replies)
I have a script which required the month and day as the input
ex : ./script <Month> <date>
from this I get the list of files to do further logics. The problem is when I assign these $1 and $2 to variables, and use grep command in the script
ls -l |grep "$1 $2"
it works fine for two... (1 Reply)
Hi guys,
I need to find tomorrows date in date fomat and should be in variable.
as I need to grep this date in a flat file
ie. if today's date is '09 JAN 2009'
output should be '10 JAN 2009'
unix/perl script will be fine. (21 Replies)
Hi,
I would greatly appreciate it if someone can help me with my problem.
I have a crawler which collects spam URLs everyday & this data needs to be published in a blacklist.
Here's the catch:
The "Time To Live" (TTL) for each URL is 3 months (or whatever for that matter). If i see the... (5 Replies)
I have few files in one directory as below and I require the files that were created today...
$ls -ltr
-rw-r--r-- 1 abc abc 0 Dec 5 17:34 file4.txt
-rw-r--r-- 1 abc abc 0 Dec 5 17:34 file5.txt
-rw-r--r-- 1 abc abc 0 Dec 7 17:34 file6.txt
-rw-r--r-- 1... (7 Replies)
Hi,
I have some log files. I've been asked to grep out error messages that have happened ONLY today. (However, the logs keep messages a long time so they have error messages going back weeks)
They log details in these fields (order):
Month Day Time Server message
I can grep out the... (8 Replies)
Hello,
I am trying to issue the following grep statement to no luck:
%3Eps"]root@server>ps -ef | grep -v grep | grep received/1 -c
grep: can't open -c
root@server]
if i grep on received/1, it works..but there is received/1/pdf, received/1/txt, received/1/afp ...but they all have... (2 Replies)
I'm using the below to grep two strings from my log file.
grep "09:49.*yellow" out.logNow, i wish to search for all times within 3 minutes of the greped time i.e
All time starting from 09:49:00 to 09:51:00.
Currently it searches only for 09:49:* and also searches incorrect entry like... (14 Replies)
Discussion started by: mohtashims
14 Replies
LEARN ABOUT DEBIAN
atwritemode
atprint(3) AtFS Toolkit Library atprint(3)NAME
atWriteStatus, atWriteMode, atWriteDate, atWriteName, atScanStatus - print and scan special attribute values
SYNOPSIS
#include <atfs.h>
#include <atfstk.h>
char*atWriteStatus (Af_key *aso; int verbose);
char*atWriteMode (Af_key *aso);
char*atWriteDate (Af_key *aso, char *dateAttribute);
char*atWriteName (Af_key *aso, char *path);
int atScanStatus (char *statusStr);
DESCRIPTION
atWriteStatus returns a string representation of Asos AF_STATE attribute. With the verbose argument TRUE, atWriteStatus returns a long (8
character) status name. Otherwise, on FALSE, it returns a one character short representation. The result value is a statically defined
string in any case.
atWriteMode generates a ls -l(1) like (e.g. -rwxr-xr-x) string representation of the AF_MODE attribute. It returns its result in static
memory, which will be overwritten on subsequent calls.
atWriteDate produces a date string from the given dateAttribute to be used for ls -l(1) like output (e.g. Jan 8 11:07 or Jul 10 1992).
The format of the date string depends on the value of the date attribute. The string is always 12 characters long and begins with the month
and day. For dates younger than 6 months, the third field is the time, for dates older than 6 months, the year. The result string resides
in static memory, which will be overwritten on subsequent calls.
atWriteName generates a bound pathname from path and aso.
atScanStatus converts an status string to an internal numeric status value. It understands various abbreviations, including the one charac-
ter status strings generated by atWriteStatus.
.BUGS
The format switch in afWriteDate (for dates older than six months) does not happen at exactly the right time. It may be a few days later.
AtFStk-1.12 Fri Jun 25 16:39:43 1993 atprint(3)