~aleteoryx/employ

ref: c336b37a9cdad77a91eeb54ddd88a903d1522306 employ/queuers/employ.sh -rwxr-xr-x 242 bytes
c336b37aAleteoryx in reenc too 8 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

if [ $# \!= 3 ]; then
	1>&2 echo 'usage: employ.sh <host> <port> <file>'
	exit 1
fi

host="$1"
port="$2"
file="$3"

{
	echo -n 'NEW JOB '
	stat -c %s "$file"
	cat "$file"
	echo 'MARK AS available'
	echo QUIT
} | nc "$host" "$port"