Changeset 1782


Ignore:
Timestamp:
Feb 18, 2011, 5:48:20 PM (11 years ago)
Author:
geofft
Message:
for-each-server: Remove dependency on machtype and simplify code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/locker-dev/locker/bin/for-each-server

    r1415 r1782  
    11#!/bin/sh
    22
    3 case `machtype` in
    4     linux|darwin)
    5         TAIL_ARG="-n"
    6         ;;
    7     *)
    8         TAIL_ARG=""
    9         ;;
    10 esac
    11 
    12 for server in `finger @scripts.mit.edu | tail ${TAIL_ARG} +5 | sed -n "s/  -> \([^:]*\):.*/\1/p" | sort -u`; do
     3for server in `finger @scripts.mit.edu | sed -n -e "1,5d" -e "s/  -> \([^:]*\):.*/\1/p" | sort -u`; do
    134    ssh "$server" "$@"
    145done
Note: See TracChangeset for help on using the changeset viewer.