Search Results

Search: Posts Made By: senthil.ak
2,235
Posted By Aia
From the manual: It recognizes: date...
From the manual:


It recognizes:

date --date="1 days ago"
date --date="yesterday"
date --date='10 month ago'
date --date='2 hour ago'
date --date='Second Friday'

It will read this...
9,683
Posted By bakunin
The reason why providing passwords to ssh (and...
The reason why providing passwords to ssh (and similar commands, like passwd) is difficult ist, that - for security reasons - such programs clear <stdin>. A simple redirection program < /some/file or...
9,683
Posted By temp_user
You can use expect command to login to the server...
You can use expect command to login to the server

VAR=$(expect -c 2> /dev/null "
spawn ssh -n -T -o StrictHostKeyChecking=no $user@$host
expect \"*?assword:*\"
send -- \"$passwd\r\"...
4,748
Posted By RudiC
Not sure I understand your requirements...
Not sure I understand your requirements completely, but try this:awk -v P1="ERROR OCCURRED :" -v P2="java.lang.NullPointerException" \
'$0 ~ P1 {PR=1; EP=1E99}
$0 ~ P2 && PR...
4,748
Posted By RudiC
Printing sth from your input samples that would...
Printing sth from your input samples that would fit what you requested seems not too difficult to me, but that might not fulfill the more general request. To avoid a "doesn't work" comment the very...
4,748
Posted By Don Cragun
Your problem statement is very vague. Your...
Your problem statement is very vague.

Your thread title says you want to match two patterns, but your description says you want to match three patterns???

What does "match 3 patterns...
1,433
Posted By Don Cragun
As I said before: "Without knowing more about...
As I said before: "Without knowing more about what your data looks like (both pattern.cfg and trace.log) and what output you want, we can only make wild guesses about what you're trying to do." You...
1,433
Posted By Don Cragun
Not using a single grep. You could use one...
Not using a single grep.

You could use one grep for each line in pattern.cfg.

You could use something iike awk to read pattern.cfg and match each of the basic regular expressions against the...
1,091
Posted By Tytalus
Is this close to what you're after : awk...
Is this close to what you're after :


awk '{n=NF;for (i=1;i<=n;i++){t[i]=t[i]" "$i}}END{for (i=1;i<=n;i++){print t[i]}}' tmp1 tmp2
19,567
Posted By alister
That's not a robust solution. What if there's a...
That's not a robust solution. What if there's a username or group named May or containing such a substring? It could trigger false positives. What if May occurs in the wildcard portion of abc*.txt?...
13,292
Posted By hanson44
Yes, you would get an alert after 15 minutes, if...
Yes, you would get an alert after 15 minutes, if that is the question.

If 15 minutes is too long, you could sleep less than five minutes. Or maybe use "load average" from uptime.
4,819
Posted By mirni
I usually use find $DIR -print0 | xargs -0...
I usually use
find $DIR -print0 | xargs -0 commandconstruct, which uses NULL to separate the arguments, and whitespaces are no longer special. You can look into that, if it's supported on your...
4,819
Posted By mann2719
Fine Tune - Huge files/directory - Purging
Can you please replace this line : -o -name '*(MON)*' with below code
-o -name '*(MON|TUE|WED|THU|FRI|SAT|SUN)*'

Hope this works 4 u :o:o

---------- Post updated at 05:29 AM ----------...
4,819
Posted By vidyadhar85
I would still go with option 1. However if the...
I would still go with option 1. However if the list of files to be removed is very large then you might get an error thats bevause it might go beyond the string which can be handled by the rm...
4,819
Posted By mirni
combining search patterns into one find command...
combining search patterns into one find command is a good idea.
Storing the filenames into a file and then looping through the contents of the file is slower than doing -exec, so unless you want to...
6,710
Posted By Franklin52
Sorry, didn't test the command, try this one: ...
Sorry, didn't test the command, try this one:
gunzip -c 20110203.1104.gz |
awk 'f && /^L/{s=$0;next} /^L/{print substr($0,178,15);f=1} END{print substr(s,178,15)}'
2,525
Posted By Scrutinizer
Perhaps this will go faster: grep '^.\{154\}31'...
Perhaps this will go faster:
grep '^.\{154\}31' infile > 31.txt
To just count the records:
grep -c '^.\{154\}31' infile
Likewise for 39
2,525
Posted By birei
Hi, Test next 'perl' script: $ perl...
Hi,

Test next 'perl' script:

$ perl -ne 'BEGIN { open $f31, ">", "31.txt" or die $!; open $f39, ">", "39.txt" or die $!; } ($a) = unpack "x154 A2", $_; if ($a == 31) { print $f31 $_; } elsif...
2,525
Posted By Franklin52
awk '{p=substr($0,155,2)} p ~ "3[19]" {print > p...
awk '{p=substr($0,155,2)} p ~ "3[19]" {print > p ".txt"}' file
2,525
Posted By ctsgnb
Do you have the same result running cat...
Do you have the same result running

cat LOAD.txt | cut -c 155-156 > smp.log
grep -c '31' smp.logand

cat LOAD.txt | cut -c 154-157 > smp.log
grep -c '831I' smp.log???
Showing results 1 to 20 of 20

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