Hi
I tried to open the man page of sh and piped to `pg`. Normally while reading a file page by page using `pg`, if we wanna quit at the middle of file, we give "q" near the colon mode.
Ex1: $cat file1 | pg
hi
how
r
u
: (page1) now press "return key", it will go to next page
yes
i
am
fine
: q (I wanna quit here and I gave q and its quit from the process normally)
$
The above mentioned condition is normal
My case is:
$ man sh | pg
User Commands sh(1)
NAME
sh, jsh - standard and job control shell and command inter-
preter
SYNOPSIS
/usr/bin/sh [-acefhiknprstuvx] [argument...]
--------- goes on
: q (now if i give q here, its showing error "BROKEN PIPE")
why in normal case mentioned in example 1 its not happening, while in man sh|pg its happening (broken pipe)?
Please help me on this with clear explanation?