Search Results

Search: Posts Made By: anandrec
Forum: Programming 12-13-2011
2,522
Posted By anandrec
Thanks pfylnn, I got it. It was because of...
Thanks pfylnn, I got it. It was because of newline in $c.
Forum: Programming 12-13-2011
2,522
Posted By anandrec
hey Pfylnn, if i reeive backslash it gives...
hey Pfylnn,

if i reeive backslash it gives me this error:

awk: /Tue
awk: ^ unterminated regexp
sh: line 1: /: is a directory

---------- Post updated at 07:12 AM ---------- Previous update...
Forum: Programming 12-13-2011
2,522
Posted By anandrec
Thanks pfylnn for your reply. Its a perl...
Thanks pfylnn for your reply.

Its a perl script. Actually my code is as below:

system("lastlog -u user > last.txt");
`sed -n '2p' last.txt > last1.txt`;
$c = `cut -c44-62 last1.txt`;
print...
Forum: Programming 12-13-2011
2,522
Posted By anandrec
take input from a variable as pattern to awk
Hi everyone,

Can anyone tell me how to take contents of a variable as a pattern for awk command. Am doing as below, but doesnt get any output:
$c = "Tue Dec";
$log = ` awk '/ \$c /' in.txt`;...
2,980
Posted By anandrec
Maximum unsuccessful attempts in unix
Hello everyone,

Can anyone help me out where is the maximum unsuccessful login attempts stored in unix?

How can we know how many unsuccessful login attempts an user has made?

Where is the...
Forum: Programming 12-06-2011
1,488
Posted By anandrec
Thanks for reply, but when i execute the whole...
Thanks for reply, but when i execute the whole script same error still exists as below:
Argument "" isn't numeric in integer gt (>) at /usr/lib/perl5/5.8.0/Time/Local.pm line 91.
Day '' out of...
Forum: Programming 12-06-2011
1,488
Posted By anandrec
Date difference
I tried the below code to find difference between two dates. It works fine if the day of the month is 2-digit number. But it fails when we have a single-digit day of month(ex:1-9). my code is as...
Showing results 1 to 7 of 7

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