This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"tail" command does not work as advertised


The "tail +4" commands does not work as advertised. When given such command (advertised in man command), it complains it can't open the file. With the command "tail +5 -", it produces the desired output with some junk on standard output.

See examples:

$ ps -a | tail +5 -
tail: cannot open `+5' for reading: No such file or directory
==> standard input <==
     PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
    5644       1    5644       5644    ?   18 20:24:45 /usr/bin/cygrunsrv
    4928    5644    4928       4896    ?   18 20:24:45 /usr/sbin/cron
I    5088       1    5088       5356  con 1003 21:02:39 /lbin/ksh
    5808       1    5808       4996  con 1003 21:02:53 /usr/bin/rxvt
    6036    5808    6036       5580    0 1003 21:02:53 /usr/bin/ksh
    5668    6036    6036       5668    0 1003 21:32:28 /usr/bin/ksh
I    5060    6036    6036       4544    0 1003 21:32:28 /usr/bin/tail
    3832    5668    6036       2328    0 1003 21:32:28 /usr/bin/ps
/home/Paul.$ ps -a | tail +3
tail: cannot open `+3' for reading: No such file or directory

All examples are supposed to produced output from the beginning of the file.

- Paul


-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]