![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help me in sending parameters from sqlplus script to unix shell script | Hara | Shell Programming and Scripting | 2 | 01-29-2008 03:31 PM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 04:06 AM |
| how to find Script file location inside script | asami | Shell Programming and Scripting | 10 | 03-15-2006 12:57 AM |
| Problems installing perl5 | irasela | UNIX for Dummies Questions & Answers | 0 | 03-03-2006 08:06 PM |
| one question of perl5 | ybz3721 | UNIX for Advanced & Expert Users | 1 | 04-17-2002 01:57 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hey, Im trying to create a script to create a dir-tree of pod converted to html. so far this is the script: Code:
#!/bin/sh
cd /usr/lib/perl5
for d in ./* ; do
# is it a dir?
if [ -d $d ]; then
# yes! get the basename
cd $d ; dir=`basename $d`
for f in ./* ; do
# is it a dir?
if [ -d $f ]; then
# yes! get the basename and create it
ndir=`basename $f` ; mkdir -p /root2/perl-html/$dir/$ndir ; cd $f
# is there anything in it
for f2 in ./* ; do
#yes! what is it
if [ -d $f2 ]; then
# its a dir! get the basename and create it
ndir=`basename $f2` ; mkdir -p /root2/perl-html/$dir/$ndir ; cd $f2
# is there anything in it
for f3 in ./*.pm ; do
nfile=`basename $f3`; pod2html $nfile >/root2/perl-html/$dir/$ndir/$nfile.html
done
else
nfile=`basename $f2` ; pod2html $nfile >/root2/perl-html/$dir/$nfile.html
fi
cd ..
done
else
nfile=`basename $f` ; pod2html $nfile >/root2/perl-html/$dir/$nfile.html
fi
done
fi
cd /usr/lib/perl5
done
# nfile=`basename $f2` ; pod2html $nfile >/root2/perl-html/$dir/$ndir/$nfile.html
It kinda works but the dirs don't get created and some dirs are comming out as .html files... I know iv'e overlooked something so simple but i cant see it ... In need of some jolt me thinks Cheers, Elfyn elfyn@exposure.org.uk |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|