OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [fixcat] - Blame information for rev 1780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!expect --
2
# Synopsis: fixcat
3
# Author: Don Libes
4
 
5
# Description: test to see if /bin/cat is unbuffered (i.e., -u is needed)
6
# Return 0 if buffered, 1 if unbuffered.
7
#
8
# If this file is sitting in an architecture-specific library directory,
9
# then it serves as a marker that your /bin/cat buffers by default.
10
 
11
# test for when catting to/from files
12
log_user 0
13
spawn -open [open "|cat" "r+"]
14
send "\r"
15
expect "\r" {exit 1}
16
 
17
# test for when catting to real tty
18
#log_user 0
19
#spawn /bin/cat
20
#send "\r"
21
#expect "\r\n\r\n" {exit 1}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.