Assuming that every segment in your file contains a cn=name line, this might be a little bit simpler (and more portable) to get the output you said you wanted:
Modifying your code so it prints the names of users (if cn=name identifies a user's name) that do not have an authtime=year entry (although naming the variable that contains that list lastauthtime is not at all descriptive), you could try:
which produces the output:
Or, more simply (and, perhaps, with less confusing names):
which produces the output:
As always, if you want to use any of these scripts on a Solaris/SunOS system, change awk in these scripts to /usr/xpg4/bin/awk or nawk.
This User Gave Thanks to Don Cragun For This Post:
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
Using a new utility sift (here written as gogrep to avoid a name collision at our site):
producing:
In addition to flexibility, sift is impressively fast.
Guys, I have a issue that I am trying to rectify please advise.
lpstat -t shows
scheduler is running
printer lext644 disabled since Mon Dec 02 19:48:18 2013. available.I have restarted the printer service and it shows online but the above says disabled. I have a lot of jobs in the print... (1 Reply)
Currently, I have a print filter that takes a text file, that convert it into PCL which then gets to a HP printer. This works.
Now I need to embedded a image file within the text file.
I'm able to convert the image file into PCL and I can cat both files together to into a single document... (1 Reply)
Hello,
Sometimes i need to clear all the jobs of a print queue and it is really annoying to cancel one by one.
Is there a way to cancel all print jobs for a specific print queue with a single command instead of cancelling them one by one?
My AIX system is 5.3
Thank you for your attention (2 Replies)
Hi all,
This should be very easy but I can't figure it out...
I have a file that looks like this:
@SRR057408.1 FW8Y5CK02R652T length=34
AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT
+SRR057408.1 FW8Y5CK02R652T length=34
FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8
@SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
I'm trying to clean up my samba share and need to print the found file or print the path of the image it tried to searched for. So far I have this but can't seem to get the logic right. Can anyone help point me in the right direction?
for FILE in `cat list`; do
if ;
then
... (1 Reply)
I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (2 Replies)
I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (1 Reply)
Hi,
Could any one please let me know what is the option
available in UNIX to print by specifying the paper size?
We are using Unix11i. I could n't see any option specified in the 'lp' command to print the report by specifying the size of the paper. It would be of great help to me, if... (1 Reply)
The line is simple, use " '{ print $1"]"$2"\"$3THE " NEEDS TO GO HERE$4 }'
I've tried \", "\, ^" and '"" but none of it works. What am I missing? Putting in the [ between $1 and $2 works fine, I just need to do the same with a ".
Thanks. (2 Replies)