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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [fixcat] - Rev 1765

Compare with Previous | Blame | View Log

#!expect --
# Synopsis: fixcat
# Author: Don Libes

# Description: test to see if /bin/cat is unbuffered (i.e., -u is needed)
# Return 0 if buffered, 1 if unbuffered.
#
# If this file is sitting in an architecture-specific library directory,
# then it serves as a marker that your /bin/cat buffers by default.

# test for when catting to/from files
log_user 0
spawn -open [open "|cat" "r+"]
send "\r"
expect "\r" {exit 1}

# test for when catting to real tty
#log_user 0
#spawn /bin/cat
#send "\r"
#expect "\r\n\r\n" {exit 1}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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