source: trunk/locker/bin/for-each-server @ 1462

Last change on this file since 1462 was 1375, checked in by quentin, 15 years ago
Make for-each-server work on Darwin
  • Property svn:executable set to *
File size: 251 bytes
RevLine 
[1280]1#!/bin/sh
[1336]2
3case `machtype` in
[1375]4    linux|darwin)
[1336]5        TAIL_ARG="-n"
6        ;;
7    *)
8        TAIL_ARG=""
9        ;;
10esac
11
12for server in `finger @scripts.mit.edu | tail ${TAIL_ARG} +5 | sed -n "s/  -> \([^:]*\):.*/\1/p" | sort -u`; do
[1280]13    ssh "$server" "$@"
14done
Note: See TracBrowser for help on using the repository browser.