You have a loop over all PDF files in and under $SYSDIR in your main loop that includes a call to rss_body which includes a loop over all PDF files in and under $SYSDIR. This is almost certainly not what you want, but without a better description of where PDF files are located in your file hierarchy and what XML files you're trying to create, I'm not clear on what you want to accomplish.
What OS are you using? How are you invoking feedgen1.sh?
Are you getting any output at all from feedgen1.sh?
Are any files being created by your current script? (And, if so, what is in them?)
What is the output from the commands:
Is the output you see from the above commands representative of the locations of the PDF files you want to report in your XML files (or do you just have 1 or 2 PDF files installed for testing)? Is the output you see from the above commands representative of the directory structure you hope to see under $RSSDIR?
What XML files are you hoping to create from the output shown by the above commands?
The variable DESC is unset in this script, but $DESC is used in rss_body. What is the description tag in your XML files supposed to contain for your PDF files?
Hello,
I am a newbie who is attempting to write a script to monitor a directory for a set of 3 files that I am expecting to get ftp'd. Occasionally, we suspend operations for maintenance etc. but we still get the files so there can be more than 1 set. If there is more than 1 set, I would like... (2 Replies)
What is the best way for a script to run to monitor a directory for the presence of files and then perform a function afterwords? I was hoping to have it continually run and sleep until it detects that files are present in the directory, then break out of the loop and go on to the next step.
... (17 Replies)
Hi All,
We are having important config files in an directory which was accessable by all
/auto/config/Testbed/>ls
config1.intial
config2.intial
config3.inital
often we find that some of the lines are missing in config files, we doubt if some one is removing.
I would like to write... (0 Replies)
Hi,
Im trying to write this script but im stuck on it, basicaly what i want to do is to write a code to verify a log file ( apache log file for example ) and for each new line with specific data , then, output this new line for another file:
full ex:
output of the server.log is (... (4 Replies)
Hello dear Community,
I have a task to wrtie a script which will gzip not zipped files in a directory and itīs subdirectories. I succeeded in gzippung the directory but not the subdirectories:
#/bin/bash
#go to the directory where to zip
cd $1
#Zip unzipped files
for i in `ls | xargs... (2 Replies)
hello,
i`m new in bash scripting and i getting an error with my little server monitoring script
example of my script:
#!/bin/sh
s1_ats=0
while ; do
sleep 5
s1=`ping -c 1 xxxx.xxxx.xxxx.xxxx | grep 64 | awk '{print $1}'`
if ; then
$s1_ats=0
else
if ; then (2 Replies)
I'd like to create simple bash script that, given a directory, compresses each directory by name, e.g.:
Contents of ~/Documents
Folder1
Folder2
Folder3
compress-subdirectoies.sh ~/Documents
Results:
Folder1.
Folder2.
Folder2.
Any advice would be appreciated (7 Replies)
#!/bin/bash
#
name=$1
type=$2
number=1
for file in ./**
do
if
then
filenumber=00$number
elif
then
filenumber=0$number
fi
tempname="$name""$filenumber"."$type"
if (4 Replies)
I have a bash that downloads a list and if that list has data in it then a new main directory is created (with the date) with several subdirectories (example1, example2, example3). My question is in that list there are portion of specific file types (.vcf.gz) - identifier towards the end that have... (0 Replies)
Discussion started by: cmccabe
0 Replies
LEARN ABOUT REDHAT
xmlto
XMLTO(1) xmlto XMLTO(1)NAME
xmlto - apply an XSL stylesheet to an XML document
SYNOPSIS
xmlto [-o output_dir] [-x custom_xsl] [-m xsl_fragment]
[-v] [-p postprocessor_opts] [--extensions] [--searchpath
path] [--skip-validation] {format} {file}
xmlto {--help | --version}
DESCRIPTION
The purpose of xmlto is to convert an XML file to the desired format using whatever means necessary. This may involve two steps:
1. The application of an appropriate XSL stylesheet using an XSL-T processor.
2. Further processing with other tools. This step may not be necessary.
To decide which stylesheet to use and what, if any, needs to be done to post-process the output, xmlto makes use of format scripts, which
are simple shell scripts that xmlto calls during the conversion.
The appropriate format script is selected based on the type of XML file and the desired output format. xmlto comes with some format scripts
for converting DocBook XML files to a variety of formats. You may specify your own format script by using an absolute filename for format
on the command line.
Firstly, if xmlto has not been told explicitly which stylesheet to use (with the -x option), the format script will be called with $1 set
to stylesheet. The environment variable XSLT_PROCESSOR contains the base name of the executable that will be used to perform the XSL-T
transformation (for example xsltproc), and the environment variable XSL_DIR contains the path to the directory containing some useful
stylesheets that come with xmlto. The format script should write the name of the stylesheet to use to standard output and exit success-
fully, or exit with a non-zero return code if there is no appropriate stylesheet to use (for example, if the only available stylesheet is
known not to work with the XSL-T processor that will be used). If nothing is written to standard output but the script exits successfully,
no XSL-T transformation will be performed.
Secondly, after an XSL-T processor has been run using the stylesheet, the format script will be called again, this time with $1 set to
post-process. The format script should perform any necessary steps to translate the XSL-T processed output into the desired output format,
including copying the output to the desired output directory. For post-processing, the format script is run in a temporary directory con-
taining just the processed output (whose name is stored in XSLT_PROCESSED and whose basename is that of the original XML file with any
filename extension replaced with .proc). INPUT_FILE is set to the name of the original XML file, OUTPUT_DIR is set to the name of the
directory that the output (and only the output) must end up in, and SEARCHPATH is set to a colon-separate list of fallback directories in
which to look for input (for images, for example). If this step is unsuccessful the format script should exit with a non-zero return code.
-v Be verbose (-vv for very verbose).
-x stylesheet
Use stylesheet instead of asking the format script to choose one.
-m fragment
Use the provided XSL fragment to modify the stylesheet.
-o directory
Put output in the specified directory instead of the current working directory.
-p postprocessor_opts
Pass postprocessor_opts to processing stages after stylesheet application (e.g. lynx or links when going through HTML to text, or
xmltex when going from through TeX to DVI). If -p is specified a second time, the options specified will be passed to second-stage
postprocessing; presently this is only applicable when going through xmltex and dvips to PostScript.
--extensions
Turn on stylesheet extensions for the tool chain in use (for example, this might turn on passivetex.extensions and use.extensions if
PassiveTeX is being used). The variables turned on are the ones used by Norman Walsh's DocBook XSL stylesheets.
--searchpath path
Add the colon-separated list of directories in path as fallback directories for including input.
--skip-validation
Skip the validation step that is normally performed.
--help Display a short usage message. It will describe xmlto's options, and the available output formats.
--version
Display the version number of xmlto.
EXAMPLES
To convert a DocBook XML document to PDF, use:
xmlto pdf mydoc.xml
To convert a DocBook XML document to HTML and store the resulting HTML files in a separate directory use:
xmlto -o html-dir html mydoc.xml
To convert a DocBook XML document to a single HTML file use:
xmlto html-nochunks mydoc.xml
To modify the output using an XSL fragment use:
xmlto -m ulink.xsl pdf mydoc.xml
To specify which stylesheet to use (overriding the one that the format script would choose) use:
xmlto -x mystylesheet.xsl pdf mydoc.xml
AUTHOR
Tim Waugh <twaugh@redhat.com>.
Linux October 2002 XMLTO(1)