Search Results

Search: Posts Made By: humble_learner
2,235
Posted By RudiC
The batchfile handling might be self-explanatory,...
The batchfile handling might be self-explanatory, and for ssh's public key authentication there's many a thread in these fora. The links at bottom left under "More UNIX and Linux Forum Topics You...
2,235
Posted By RudiC
As your directory names are suitably formatted,...
As your directory names are suitably formatted, you can just use ls's inherent sort. Tryecho rm $(ls -1d 2018* | head -1) The echo is for testing / debugging only.


BTW, you mayhap don't need the...
2,543
Posted By Peasant
This should work in newer bash and ksh. ...
This should work in newer bash and ksh.
Additional error handling should be done against utilities used against accounts.

#!/usr/bin/ksh
begin=0
i=0
nump=5 # number of accounts per processing,...
4,878
Posted By Chubler_XL
You should avoid changing the "test" file when...
You should avoid changing the "test" file when cat could still be reading it, this will become evident if your input file is large and cat hasn't buffered the whole thing before the script starts...
4,878
Posted By Scrutinizer
You are removing lines from test inside the loop...
You are removing lines from test inside the loop when it is also the input file for the loop. That is not right.
What version of ksh are you using ? If it is ksh88 then the substitutions will not...
4,878
Posted By Aia
Save as beyondfifty.pl #!/usr/bin/perl use...
Save as beyondfifty.pl
#!/usr/bin/perl
use strict;
use warnings;
use Time::Local;
use File::Copy qw(move);

my $locked = "lockedusers.txt";
my $keep = "$locked.tmp";

my $fifty_days_ago =...
4,878
Posted By MadeInGermany
and 86400 sec = 60 * 60 * 24 sec = 1 day A - B...
and 86400 sec = 60 * 60 * 24 sec = 1 day
A - B > 0 is equal to A > B so you can do
while IFS="_ " read LUSER LDATE
do
if [ $(( $(date +%s) - $(date +%s -d"${LDATE:2:2}/${LDATE:0:2}/${LDATE:...
4,878
Posted By RudiC
50 * 86400 sec = 4320000 sec
50 * 86400 sec = 4320000 sec
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 02:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy