Search Results

Search: Posts Made By: slashbash
2,012
Posted By Skrynesaver
Alternations should be parenthesised egrep...
Alternations should be parenthesised

egrep -v '(T11|12.4\((7|3)\))'
1,508
Posted By bartus11
Just remove the code from the fist part:{for(i in...
Just remove the code from the fist part:{for(i in b){if(b[i]-1&&a[i]!=b[i]){}else{print "NEW:"i";\t\t"b[i]} } }
7,757
Posted By Chubler_XL
OK think I have it now: cd...
OK think I have it now:

cd /path/to/cisco/logs
files=`ls ciscostats_* | sort -t_ -k2.5r -k2.3,2.4r -k2.1,2.2r`
awk -F, -vLOOK=50 -vMATCH=20 '
FNR==1{F++}F==1{a[$1","$2","$3]++;next}
...
7,757
Posted By Chubler_XL
OK give this a try, you can change the value LOOK...
OK give this a try, you can change the value LOOK to control how many files are searched and MATCH for how many must match.

cd /path/to/cisco/logs
files=`ls ciscostats_* | sort -t_ -k2.5...
7,757
Posted By Chubler_XL
This might be close to what you need. It...
This might be close to what you need.

It compares the newest file against the 50 most recent and any record that appears in more than 20 files is printed:

cd /path/to/cisco/logs
files=`ls...
2,001
Posted By Chubler_XL
In a earlier post you said that things were...
In a earlier post you said that things were printing all over the place. The printf was just so you could see what file each line was comming from.

printf outputs the pathname of the file with...
2,001
Posted By Chubler_XL
Can't explain why tail if failing to open the...
Can't explain why tail if failing to open the file.

You could try:
tail -2 < /var/tmp/$ip/test.log | head -1
or
cat /var/tmp/$ip/test.log | tail -2 | head -1
2,001
Posted By Chubler_XL
oops sorry typo in the script try this: ...
oops sorry typo in the script try this:

while read ip
do
printf "/var/tmp/%s/test.log: " $ip
tail -2 /var/tmp/$ip/test.log | head -1
done < /tmp/ip_list
2,001
Posted By Chubler_XL
how about: while read ip do printf...
how about:

while read ip
do
printf "/var/tmp/%s: " $ip
tail -2 /var/tmp/ip_list | head -1
done < /tmp/ip_list
2,001
Posted By Corona688
If it's the 1.1.1.1 that's being replaced, don't...
If it's the 1.1.1.1 that's being replaced, don't put 1.1.1.1 in there.

Also, don't put spaces, that will seperate it into different filenames as far as the shell's concerned.
while read ip
do
...
Showing results 1 to 10 of 10

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