05-21-2009
OK, I will explain. There are numerous commands as you know and with the man page you can know about this command. So let us say, I type in man ls for example, or with an option man ls -l, and I get info about this command. Now what I want to do is this: I want to ask the program to tell me how many lines will the man page display about this specific command, in our example ls or with option ls -l. And then again ask about how many specific pair of letters come up in the man pages of this command. So using our example again (ls), I want to ask the programme how many of the letters lm appear in each line of the man pages of this command, for example. To sum up.
I want to know:
1. How many lines about a certain command appear in the man pages when I type man command or man comman -option.
2. How many pair of words appear in each line. So for example to know how many lm appear in each lien of this command in the man pages.
Hope it is a bit clear now. Sorry, if I didn't make it clear before!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
AIM: Need to test for the presence of some files (*.F) in a certain directory.
having a problem with this line is ksh:
if test `ls $SOMEDIR/dir/*.F \
2>/dev/null|wc -w` -eq 0
Basically testing for the presence of *.F files in the specified directory. If the return... (4 Replies)
Discussion started by: enoch
4 Replies
2. UNIX for Dummies Questions & Answers
Hi
If my ls -l results in 1000 lines and i just want to see the last few lines in the list what arguments do i pass
eg lets say i want to see only the last 5 lines of 'ls -l' result (2 Replies)
Discussion started by: zomboo
2 Replies
3. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
4. Shell Programming and Scripting
HI
I have a text file named docs with 100 filenames with full directory path one by one. I want to perform an action on all of them, the action i want to do this chown bin:bin <filename>. The <filename> should be each line in the docs text file. Please give the code. Somebody told to use for... (2 Replies)
Discussion started by: PrasannaKS
2 Replies
5. Shell Programming and Scripting
Hi All,
I was testing for blank lines and I want to use the cat command only
for groupline in `cat /home/test/group`
do
if
then
echo "blank found"
fi
done
I want to check if the current line read is a blank line.
I have tested with $groupline="\n" ,... (11 Replies)
Discussion started by: datkan
11 Replies
6. Shell Programming and Scripting
i hav a text file(abc.txt) in which it have 2 lines as shown
Number of agencies didnt send the file= 0
sum of reject files= 0
######
to get one line from the text file ... i use grep command
grep 'Number of agencies didnt send the file= 0' abc.txt
... (7 Replies)
Discussion started by: nani1984
7 Replies
7. Shell Programming and Scripting
I have been doing a lot more bash on LINUX RedHat and Ubuntu lately, and one thing keeps cropping up intermittently. If I do a $( some-commands ) Command Substitution, the some-commands are logged onto my screen each time they are evaluated. Did I turn on some odd option? It seems to happen just... (13 Replies)
Discussion started by: DGPickett
13 Replies
8. Shell Programming and Scripting
I am writing a script and my command is long so it goes down to the next line, but it does not run properly, the pipe is missing the wc -l. how do i fix this problem.
find ${ARCHIVE}/${dir} -type f -name "${TEMP2}*" | awk -F/ '{print $NF}' | wc -l (8 Replies)
Discussion started by: football12345
8 Replies
9. UNIX for Advanced & Expert Users
Hi,
I have a requirement like, I have a list of pattens in a file say pattern.txt,
PHC111
PHC113
and in another file called master.lst i have entries like,
PHC111
a
b
PHC112
a
PHC113
b
c
PHC114
d
e (5 Replies)
Discussion started by: rbalaj16
5 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I have an encoded file and I wish to see what is written inside.
The first line is given below:
eval "$(dd if=$0 bs=1 skip=69 2>/dev/null|gpg -d 2>/dev/null)"; exit
PS: When I google above code, it says that command is use for encryption...
Following lines include many strange... (2 Replies)
Discussion started by: baris35
2 Replies
MAN(1) BSD General Commands Manual MAN(1)
NAME
man -- display the on-line manual pages (aka ``man pages'')
SYNOPSIS
man [-acw|-h] [-C file] [-M path] [-m path] [-S srch] [[-s] section] name ...
man -k [-C file] [-M path] [-m path] keyword ...
man -p
DESCRIPTION
The man utility displays the manual pages named on the command line. Its options are as follows:
-a Display all of the man pages for a specified section and name combination. (Normally, only the first man page found is displayed.)
-C Use the specified file instead of the default configuration file. This permits users to configure their own man environment. See
man.conf(5) for a description of the contents of this file.
-c Copy the man page to the standard output instead of using more(1) to paginate it. This is done by default if the standard output is
not a terminal device.
-h Display only the ``SYNOPSIS'' lines of the requested man pages. For commands, this is typically the command line usage information.
For library functions, this usually contains the required include files and function prototypes.
-k Display the header lines for any man pages matching keyword(s), in the same manner as apropos(1).
-M Override the list of standard directories which man searches for man pages. The supplied path must be a colon (``:'') separated list
of directories. This search path may also be set using the environment variable MANPATH. The subdirectories to be searched, and
their search order, is specified by the ``_subdir'' line in the man configuration file.
-m Augment the list of standard directories which man searches for man pages. The supplied path must be a colon (``:'') separated list
of directories. These directories will be searched before the standard directories or the directories specified using the -M option
or the MANPATH environment variable. The subdirectories to be searched, and their search order, is specified by the ``_subdir'' line
in the man configuration file.
-p Print the search path for the manual pages.
-s Restrict the directories that man will search to the specified section. The man configuration file (see man.conf(5)) specifies the
possible section values that are currently available.
-S Display only man pages that have the specified string in the directory part of their filenames. This allows the man page search
process criteria to be narrowed without having to change the MANPATH or ``_default'' variables.
-w List the pathnames of the man pages which man would display for the specified section and name combination.
If the '-s' option is not specified, there is more than one argument, the '-k' option is not used, and the first argument is a valid section,
then that argument will be used as if specified by the '-s' option.
If name is given with a full or relative path then man interprets it as a file specification, so that you can do man ./foo.5 or even man
/cd/foo/bar.1.gz.
ENVIRONMENT
MACHINE As some man pages are intended only for specific architectures, man searches any subdirectories, with the same name as the current
architecture, in every directory which it searches. Machine specific areas are checked before general areas. The current machine
type may be overridden by setting the environment variable MACHINE to the name of a specific architecture.
MANPATH The standard search path used by man may be overridden by specifying a path in the MANPATH environment variable. The format of the
path is a colon (``:'') separated list of directories. The subdirectories to be searched as well as their search order is speci-
fied by the ``_subdir'' line in the man configuration file.
PAGER The pagination command used for writing the output. If the PAGER environment variable is null or not set, the standard pagination
program more(1) will be used.
FILES
/etc/man.conf default man configuration file.
/usr/{share,X11R7,pkg,local}/man/whatis.db standard whatis/apropos database search path, set in /etc/man.conf.
SEE ALSO
apropos(1), whatis(1), whereis(1), man.conf(5), mdoc(7), mdoc.samples(7)
STANDARDS
man conforms to X/Open Commands and Utilities Issue 5 (``XCU5'').
BUGS
The on-line man pages are, by necessity, forgiving toward stupid display devices, causing a few man pages to be not as nicely formatted as
their typeset counterparts.
BSD
October 7, 2011 BSD