File: write.sh

package info (click to toggle)
xtell 2.9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 188 kB
  • ctags: 73
  • sloc: ansic: 982; sh: 117; makefile: 78; python: 22
file content (19 lines) | stat: -rwxr-xr-x 231 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh


if [ "$#" != "1" -a "$#" != "2" ]; then
  echo 'Usage: write user [tty]'
  echo 'or:    xtell user[:tty]@fqdn'
  exit 0
fi

user=$1
tty=$2

if [ "$tty" = "" ]; then
  arg=$user
else
  arg=$user:$tty
fi

exec xtell $arg