* Copyright (c) 1991 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
* @(#)echo.c 5.1 (Berkeley) %G%
extern int optind
, opterr
;
while ((ch
= getopt(argc
, argv
, "ne")) != EOF
)
error("usage: %s [-ne] [arg]...", *argv
);
case 'b': c
= '\b'; break;
case 'c': return 0; /* exit */
case 'f': c
= '\f'; break;
case 'n': c
= '\n'; break;
case 'r': c
= '\r'; break;
case 't': c
= '\t'; break;
case 'v': c
= '\v'; break;
case '\\': break; /* c = '\\' */
case '0': /* should be [0-7] */
while (--count
>= 0 && (unsigned)(*p
- '0') < 8)
c
= (c
<< 3) + (*p
++ - '0');