Search Results

Search: Posts Made By: BatterBits
3,859
Posted By Don Cragun
Hi Ian, You can award a gold star (or at least...
Hi Ian,
You can award a gold star (or at least note your thanks) by clicking the "Thumbs Up Thanks" button at the bottom left of any post that you did not submit and that you have not already...
3,859
Posted By Don Cragun
I picked up the tail -6 from BitterBits' post #1....
I picked up the tail -6 from BitterBits' post #1. If the intent is to process all files, neither tail nor ls are needed, just:
for lf in *.log.0??;do printf '%s %s\n' "$lf" "$(tail -1 "$lf")" | awk...
3,859
Posted By Scrutinizer
Hi, find . -name '*.log.[0-9][0-9][0-9]' | #...
Hi,
find . -name '*.log.[0-9][0-9][0-9]' | # get a the names of all the hosts
sort -t. -k1.2,1n -k2 | # sort this using a "." as a field separator; sort
...
3,859
Posted By Scrutinizer
Try: find . -name '*.log.0??' | sort -t....
Try:
find . -name '*.log.0??' |
sort -t. -k1.2,1n -k2 |
while read f
do
printf "%s " "$f"
tail -1 "$f"
done

Note: Using *.log.0?? would limit the result to the first 99 iterations for...
Showing results 1 to 4 of 4

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