Search Results

Search: Posts Made By: drewnix
3,364
Posted By drewnix
Need to script following a noisy log file which rolls over
I'd like to write a script or even a good command line that can follow a very noisy log file looking for specific patterns but can also handle log roll overs in an intelligent way.

I sometimes do...
1,507
Posted By drewnix
You can use if statements to key off of the...
You can use if statements to key off of the return code of a command. You could do something similar to the following:

if ! cmp <file a> <file b>; then
echo "pass!"
fi
11,410
Posted By drewnix
Sure scripts can ssh, scripts can do pretty much...
Sure scripts can ssh, scripts can do pretty much anything. You can send a command
from a script over ssh like so

ssh <user>@<host> <command>

The issue you get to is if you don't want to type...
4,687
Posted By drewnix
I don't have a problem your solution is fine. As...
I don't have a problem your solution is fine. As I said I was trying to fit with what I perceived the original poster asked for. And you are splitting hairs here. Of course you can do array creation...
4,687
Posted By drewnix
From post #3...
From post #3...
4,687
Posted By drewnix
That was part of the original posters...
That was part of the original posters requirements.
4,687
Posted By drewnix
You could use arrays to... t=(`echo "1 2 3...
You could use arrays to...

t=(`echo "1 2 3 4"`)
v=(`echo "a b c d"`)

for index in "${t[@]}"; do
echo $index/${v[$index-1]}
done
Showing results 1 to 7 of 7

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