Hi , I am having a script which will start a process and appends the process related logs to a log file. The log file writes logs with every line starting with date in the format of: date +"%Y %b %d %H:%M:%S".
So, in the script, before I start the process, I am storing the date as DATE=`date +"%Y... (5 Replies)
I am new to Unix so will really appreciate if someone can guide me on this.
What I want to do is:
Step1: Read binary file - pick first 2 bytes, convert from hex to decimal. Read the next 3 bytes as well.
2 bytes will specify the number of bytes 'n' that I want to read and write... (1 Reply)
Hi,
I am working in device drivers. I am new to device drivers. i have invoked chardev.c.
the driver is insmoded. now i want to write something into this and i want to look what i have written. but i don't know how to write and see. please help me (0 Replies)
I have a text file called (msgz ) contains data :
Subscriber
Data ID = 2
Customer = 99
Data ID = 4
Customer = cf99
Data ID = 5
Customer = c99
Data ID = 11
Customer = 9n9
Subscriber
Data ID = 1
Customer = 9ds9
Data ID = 2
Customer = 9sad9
Data ID = 3
Customer = f99... (3 Replies)
I have list of files in a directory 'dir'. Each file is of type HTML. I need to read each file and get the string which starts with 'http' and write them in a new text file. How can i do this shell scripting?
file1.html
<head>
<url>http://www.google.com</url>
</head>
file2.html
<head>... (6 Replies)
Hello,
I need to do one thing that my script creates the file
touch release.SPLASH_12_03_00_RC01.txt
Now I want to update that file with some content e.g
splashbuild::SPLASH_12_17_00_RC02.zip
Thanks (1 Reply)
dear all,
i need your advice
i have sample script like this:
testing.sh
for i in {1..10}
do
echo testing $i
done
but i forgot create "#!/bin/bash" in above "for"
so i want output will like this
testing.sh
#!/bin/bash
for i in {1..10}
do
echo testing $i
done (2 Replies)
hi..i would ask about how to write over data to new file with BASH.
so..assume my data looks like this :
11
12
13
14
15
...and so on. It's always line by line. and that's for the first file.
i want to write over those numbers into second file but by using space. so my second file should be... (5 Replies)
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 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)