Not sure what you mean with "then remove this line", but with this, you'll have the desired LUSER variable if the date portion is longer than 50 days back:
This is not ksh tested. You might be able to use ksh's printf "%(fmt)T" builtin should your system's date not allow for the -d option...
Aloha! I have just over 1k of users that have permissions that they shouldn't under our system. I need to parse a provided list of usernames, check their permissions file, and strip the permissions that they are not allowed to have. If upon the permissions strip they are left with no permissions,... (6 Replies)
Hi,
In ksh we use 'while read line' statement to read a file line by line. In my input file I have 5 spaces appended at the end of each line. When I use while read line statement it chops off the spaces at the end of each line
Inp.txt
aaaa<five spaces>
bbbb<five spaces>
cccc<five spaces>
... (3 Replies)
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
So, the beginning of my script will cat & grep a file with the output directed to a new file. The data I have in this file needs to be parsed, read and evaluated.
Basically, I need to identify the latest date/time stamp and then calculate whether or not it is within 15 minutes of the current... (1 Reply)
Hi All,
I am new to the scripting and using solaris 10 OS. Please suggest me from the below script which modifications need to be done to delete the files more that 2days older. Current script is deleting existing file.
# Remove old explorer runs if needed
DIR=`dirname ${EXP_TARGET}`
if ... (2 Replies)
Hi Experts/Gurus,
Is there a way to remove lines in a file that are older than x days (i.e. 30 days) based on the date stamp in the first column?
Example.
$ date
Sat Jan 11 14:12:06 EDT 2014
$cat sample.txt
10-10-2013 09:00:01 AM|Line test 1234567
16-10-2013 08:30:00 AM|Line test... (6 Replies)
I have to display only those subscribers which are in "unconnected state" and the date is 90 days older than today's date.
Below command is used for this purpose:
cat vfsubscriber_20170817.csv | sed -e 's/^"//' -e '1d' | nawk -F '",' '{if ( (substr($11,2,4) == 2017) && ( substr($11,2,8) -lt... (1 Reply)
Hi,
I have some 2000 names in a table like below.
Java
Oracle/SQL
ANSI SQL
SQL,DWH,DB
DB&Java
And by using for loop in my code i am able to get a single word but if there is any special character or space then it is considering as a next line.
I have to execute the below queries in... (10 Replies)
Discussion started by: Samah
10 Replies
LEARN ABOUT DEBIAN
luser
LUSER(8) System Manager's Manual LUSER(8)NAME
luser - process to control the clueless individuals who (mis)use computer systems, peripheral devices and system administrators. Word play
on "loser" and "user".
SYNOPSIS
luser [-d] [-g<level>] [-s] <lusername>
DESCRIPTION
luser is the primary tool a system administrator uses to manage end-user requests. This powerful tool can actually cause the specified user
to perform actions as specified by the flags.
With no flags, luser deletes every running process owned by the specified <lusername>.
OPTIONS -d Disk reclamation mode. Remove all files in the home directory of <lusername>.
-g<level>
Grovel mode. Causes the specified luser to make an act of contrition to the sysadmin for past sins. The <level> indicates the sever-
ity of the contrition:
LEVEL
0 User makes a sincere apology and promises to never do it again.
1 User buys sysadmin a large quantity of sysadmin's favorite beverage.
2 User signs over ownership of his/her car to sysadmin.
3 User resigns from the company after writing a long letter of apology detailing his/her failings.
4 User commits ritual suicide by sucking on a power strip and grounding himself to a conduit.
NOTES
Sysadmins are encouraged to use the -s option as a way to smarten up the world's user base. Use the -g option at level 4 outside the con-
fines of the machine room. The more lusers that witness the act, the better.
SEE ALSO sysadmin(1)BUGS
Occasionally, the luser may survive the effects of luser -g4. In that event, a second invocation of the command will usually prove to be
fatal.
HISTORY
Written by Eric L. Pederson <eric@bofh.org.uk>.
25 September 1995 LUSER(8)