Watching samba locks script:

smbstatus -L  just lists the headers, but it has an extra empty line at the end, and 3 header lines. We extract the important header line, and we number line it (which tabs it a little bit), and we ask that header line to be numbered at 0 ( nl -v0 , asks nl to start numbering at 0). We only print that one header line. After that we repeat the smbstatus -L  command, but we extract everything from below the 3 line to the very bottom. We exclude the empty line with grep . The end result looks like this:

The end

Leave a Reply

Your email address will not be published. Required fields are marked *