I've got a worksheet with 3 columns:
A. User Name
B. How many days left until their password expires
C. Date of their password expiration.
I'd like to be able to run a macro which determines if anybody has their password expiring in the next 10 days. So if column B contains a 10 or less, then...
Hi all,
I've got a file that has lines likes this:
2 123456789WWWWW 0501 A B
The primary key to sort on is the 123456789WWWWW and the secondary sort key is the 0501 (year/month).
My current sort command is this:
sort +1n -2 +2n -3 ${file}.stripped > ${file}.sorted
A problem exists though...
Hi all,
I am working on a script that scans several directories looking for a particular file in each and see if the file is older than 30 minutes.
The filename is core.txt in all of the directories.
Currently, I have a script that works about 90% of the time, but lately it's been flaky, and...
OK,
I searched and saw a couple of answers, but they didn't really apply to my script.
Here's a snippet from my script:
#!/bin/ksh
function build_ftp_script {
echo ${@:-} >> $ftp_script
}
function build_transfer_status {
if [[ -a $ftp_script ]] ; then
rm -f $ftp_script
fi...
Anyone know of a quick/easy way to check to see if a file hasn't been modified in the last 30 minutes?
For example, file1.txt hasn't been updated/touched since 10:30am, and file2.txt was last modified/touched at 10:55am, it's now 11:05am, how do I get the script to alert me that file1.txt is...
Hi there,
I have kludged together a KSH script to add an "index" field to a file, but it's extremely slow, because I'm reading each line of the file into a variable, then adding the index variable then the rest of the line.
This is how I did it:
while read buffer
do
index=`expr $index...
Hi all,
I have a process that wakes up, works for a little bit, then goes back to sleep for 5 minutes, wakes up, etc...
It outputs in a log file when its sleeping and when its working.
I'd like to have a script that will figure out the difference in minutes between when it went to sleep and...
Hi all,
I saw a thread about finding files with certain permissions, but I wanted the find command to list files that DON'T have the specified permissions, and are owned by a proper group.
Example:
findperms.ksh <path> <group> <permissions>
<path> = Path to search through (subdirs and files...
Hi there,
Our system has a logfile that is generated for an application when it starts and completes.
The format of the date/time is:
DD-MMM-YY@HH:MM:SS <msg>
example:
20-May-04@18:00:00 Started
I want to write a script that will display the logfile from a certain time to the same time...
Hi all,
I want to split a large file (10,000) lines into 2 5,000 line files, but with a twist:
1. Records have a string that I sort the main input file on (not a fixed string, it changes).
2. when splitting the file, records with the same exact identifier must stay together.
So for example...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.