~aleteoryx/employ

ref: 7e69e57050d38ef212139205c218a4811e764b73 employ/queuers/employ.sh -rwxr-xr-x 242 bytes
7e69e570Aleteoryx smarter filename heuristics 5 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"