This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: man : List of all commands in a section
- From: charles Bobo <charles dot bobo at mac dot com>
- To: cygwin at cygwin dot com
- Cc: Alex Vinokur <alexvn at come dot to>
- Date: Fri, 29 Dec 2006 21:43:16 -0500
- Subject: Re: man : List of all commands in a section
- References: <002d01c26904$36f1ff10$176196d4@5at8s8cqeex4qhi>
On Oct 1, 2002, at 12:37 AM, Alex Vinokur wrote:
=============
Windows 2000
CYGWIN_NT-5.0
=============
Is it possible to get list of
* all section
* all commands in some section ?
==================
Alex Vinokur
mailto:alexvn@go.to
http://up.to/alexvn
==================
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
Here is a shell script I wrote to list all commands in the PATH:
=========== snip ============
#!/bin/sh
# list all commands: list all executable commands in the current PATH.
myPATH="$(echo $PATH | sed -e 's/ /~~/g' -e 's/:/ /g')"
count=0; cmdlist="";
for dirname in $myPATH ; do
directory="$(echo $dirname | sed 's/~~/ /g')"
if [ -d "$directory" ] ; then
for command in $(ls "$directory") ; do
if [ -x "$directory/$command" ] ; then
count="$(( $count + 1 ))"
cmdlist="$cmdlist $command"
fi
done
fi
done
#echo "$count commands:"
for cmd in $cmdlist ; do
echo $cmd
done
=========== snip ============
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/