Table of Contents
Previous Sample | List of Samples | Next Sample

Renet.csh


#  Attempt to reconnect any any unavailable network connections.

#  Copyright (c) 1995 by Hamilton Laboratories.  All rights reserved.

local i
net use  |  while (1)
               @ i = getline
               if (eofgetline) break
               set i = $i:x
               if (i[0] == "Unavailable") then
                  #  Tell which connection is being restored in bright green.
                  echo "$ansi('bright green')Restoring $i[1] to $i[2]$ansi()"
                  #  Try the net use, discarding any blank lines.
                  net use $i:1-2 |& sed -- '/^^$/d'
               end
            end



Previous Sample | List of Samples | Next Sample
Table of Contents



Copyright © 1988-2003 by Hamilton Laboratories. All rights reserved.