Nostradamus
Technical User
I want to do the following.
run a command and sort the output.
Before I receive the output the command itself requires me to hit enter two times. Obviously I want to automate this.
The output then looks something like this.
1 2 3 4 5
value1 value2 value3 value4 value5
value1 value2 value3 value4 value5
value1 value2 value3 value4 value5
I want to search column 4 for a value that is 50000 or less.
I also want to skip the first 2 lines of the output, thus sorting out the 1 2 3 4 5 line.
Also, if the value in column 4 is 50 000 or less I want it to email me about it.
I've tried searching for a sollution but without luck. I think I have an idea of how to email myself and perhaps using awk, sed to sort out the column. However I can't manage to get it all to work.
Hope you understand what I mean and want to accomplish.
Thanks a lot in advance
/Sören
run a command and sort the output.
Before I receive the output the command itself requires me to hit enter two times. Obviously I want to automate this.
The output then looks something like this.
1 2 3 4 5
value1 value2 value3 value4 value5
value1 value2 value3 value4 value5
value1 value2 value3 value4 value5
I want to search column 4 for a value that is 50000 or less.
I also want to skip the first 2 lines of the output, thus sorting out the 1 2 3 4 5 line.
Also, if the value in column 4 is 50 000 or less I want it to email me about it.
I've tried searching for a sollution but without luck. I think I have an idea of how to email myself and perhaps using awk, sed to sort out the column. However I can't manage to get it all to work.
Hope you understand what I mean and want to accomplish.
Thanks a lot in advance
/Sören