Output filters in Solaris

Output filters in Solaris

Post by Don Bro » Sat, 29 Jul 1995 04:00:00

An easy way to do this is to create an alias (in csh), like this:

        alias dosprint 'unix2dos \!* | lp'

Then to print a file you would type:

        dosprint filename

It's pretty dangerous though, if you ever use wildcards or want to print
more than one file.  Unix2dos will destroy the files if you pass it multiple
names on the command line.  By writing a little script, you could make it safer

for i
        unix2dos $i | lp

Boeing Computer Services, Richland
(509) 376-6990


1. Filtering sar -d output on solaris to get only "md" devices

Solaris 2.6

I need to filter sar output in a way that will let me easily determine which
disk are the most used. In my case, mirrored SVM metadevices.

If I only use sar -d, I get the md devices, as well as their "subcomponents"
(For example, if I have mirror md0 comprised of submirrors md1 and md2, I
get md0, md1 and md2 in the output, as well as the cxtxdx... devices)

In my case, all the metadevices (mirrors here) have names that end with a

So I did someting like:

sar -d | egrep -e "md.0 |md..0 |fd0"

As you can see, I'm no awk/regex expert. I presume I could use it to do what
I want with awk.

What I would like, is to get the headings of sar (4th line of output), and
then the time (I had to use the "fd0" trick in my case) and the stats for
all md devices. I don't want the data for the underlying metadevices or
slices. Of course, if the script would be intellignet enough to work with
metadevices named in a different manner (that is, not always endig with a
"0") that would be cooler !


2. RS6000 X11 interface builders

3. Port scanning Solaris - nmap "filtered" ports and Nessus output

4. freebsd and linksys router

5. Filters, Filters, where are you Filters...

6. News archive

7. In search of Solaris 2.5 Netscape Navigator 3.0 plug ins

8. News.. Can't post out

9. Code fragments/plug-ins for solaris?

10. filter output of /dev/console ?

11. Output Filters for lpsched?

12. anyone have ditroff output filter for Epson printers?

13. Can you have an output filter on a remote printer?