Question : grep lines from N days back

Hi again:

We made a script which give this output to a file:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
acoxxx Lastlogin= 2010/07/15 13:10
db2t Lastlogin= 2010/07/16 13:09
db2tadm Lastlogin= 2010/07/20 13:09
eisuser Lastlogin= 2010/07/20 11:53
israel Lastlogin= 2010/07/10 11:42
nmon Lastlogin= 2010/07/05 12:55
norbac Lastlogin= 2010/07/04 14:21
oracle Lastlogin= 2010/07/03 08:05
root Lastlogin= 2010/07/03 13:01
s03josa0 Lastlogin= 2010/07/01 14:10

How can I grep N lines from a given day? I mean, show only lines older than N days?

Answer : grep lines from N days back

Hi theskintman,
I think you're seeing the effects of an asynchronous call here, the variable is not being set to "success" before the line returning a value executes!

You can force jQuery's ajax call to run synchronously by setting the property "async" to false.  This may not be the best way to work with your code - it may be that your success callback could act more directly on your page or data and you would be better considering that... in any case the following may give results more inline with your intentions:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
var myValue = myFunction('a', 'b');

function myFunction(var1, var2){
  var returnVar = 'something'
  $.ajax({
    //some options...
    data: 'value1='+var1+'&value2='+var2',
    async: false,
    success: function(){
      returnVar = 'success!';
    }
  });
  return returnVar;
}
Random Solutions  
 
programming4us programming4us