![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| 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 12:31 PM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 12:06 AM |
| how to find Script file location inside script | asami | Shell Programming and Scripting | 10 | 03-14-2006 09:57 PM |
| Problems installing perl5 | irasela | UNIX for Dummies Questions & Answers | 0 | 03-03-2006 05:06 PM |
| one question of perl5 | ybz3721 | UNIX for Advanced & Expert Users | 1 | 04-17-2002 09:57 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
Cheers, Elfyn elfyn@exposure.org.uk |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Maybe this is not what you are trying to accomplish, but wouldn't this work?
Code:
#!/bin/sh
cd /usr/lib/perl5
find . -type d -exec mkdir /root2/perl-html/{} \; # Create the directory structure
find . -type f -exec -exec pod2html --outfile=/root2/perl-html/{}.html {} \;
|
||||
| Google The UNIX and Linux Forums |