Date: Sun, 4 Oct 2015 19:55:08 -0453.75 From: "William A. Mahaffey III" <wam@hiwaay.net> To: FreeBSD Questions !!!! <freebsd-questions@freebsd.org> Subject: awk question Message-ID: <5611C922.4050007@hiwaay.net>
next in thread | raw e-mail | index | archive | help
I am using awk & smartctl in a small shell script to print out HDD temps in a purty format, 1 line per drive. As it happens, the output I want is spread out over 4 lines of smartctl out, requiring (I *think*) 4 calls to smartctl each piped to its own awk invocation to pull out the line I want & print its info out. Is there some way to get awk to consider more than 1 line at a time ? In my case my 4 lines are indeed sequential, & it would be a bit more efficient if I could process all 4 lines once I found the 1st one. This is definitely *not* critical, what I have now works AOK, I was/am just curious if it could be optimized a bit. TIA & have a good one. -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5611C922.4050007>