Computing.Net > Forums > Unix > Bourne Shell Script & Man

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Bourne Shell Script & Man

Reply to Message Icon

Name: Mary
Date: May 23, 2003 at 07:26:20 Pacific
OS: Unix
CPU/Ram: test
Comment:

Can someone please tell me how to write a script to determine for each word in a set whether a UNIX manual page exists for it?

Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: May 23, 2003 at 08:24:50 Pacific
Reply:

for manpages in tar ls cat unknown ; do
if [ `man $manpages 2>&1 | grep -c "^No manual"` -gt 0 ] ; then
echo "No man pages found for $manpages"
fi
done


0

Response Number 2
Name: WilliamRobertson
Date: May 26, 2003 at 16:33:53 Pacific
Reply:

Or:

for cmd in tar cat unknown
do
man -w $cmd 2>&- >&- && print $cmd
done



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


calculate previous date Unix to W2K commands



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Bourne Shell Script & Man

Write a Bourne Shell Script--help! www.computing.net/answers/unix/write-a-bourne-shell-scripthelp/2055.html

Bourne shell script www.computing.net/answers/unix/bourne-shell-script/4316.html

Bourne shell script >>>>SOS www.computing.net/answers/unix/bourne-shell-script-sos/4349.html