Ticket #1625: expect-test.sh

File expect-test.sh, 302 bytes (added by Matthew Burgess, 18 years ago)
Line 
1#!/bin/sh
2
3if [ $# -ne 1 ]; then
4 echo "Number of lines to output must be given";
5 exit 1;
6fi;
7
8lines=$1;
9
10> expect.test;
11
12for ((i=1;i<=$lines;i++)); do
13 echo "$i: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf" >> expect.test;
14done;
15
16expect -c 'spawn cat expect.test; expect';