10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies
2. Shell Programming and Scripting
I need to match two patterns in a log file and need to get the next line of the one of the pattern (out of two patterns) that is matched,
finally need to print these three values in a single line.
Sample Log:
2013/06/11 14:29:04 <0999> (725102) Processing batch 02_1231324
2013/06/11... (4 Replies)
Discussion started by: rpm120
4 Replies
3. Shell Programming and Scripting
Hi All,
I am reading a line from a file and writing it to other file.
Whenever I got a particular line then I want that line to be splited into 4 line and written it to new file. e.g My line is
U_ABC connector3 pin24E connector4 pin25E connector5 pin26E connector6 pin27E connector7... (2 Replies)
Discussion started by: diehard
2 Replies
4. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
5. Shell Programming and Scripting
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies
6. Shell Programming and Scripting
Hello
I did do a search and the past threads doesn't really solve my issue. (using various awk commands)
I need to combine the output from java -version into 1 line, but I am having difficulties.
When you exec java -version, you get:
java version "1.5.0_06"
Java(TM) 2 Runtime... (5 Replies)
Discussion started by: flagman5
5 Replies
7. Shell Programming and Scripting
Hi Guys,
I have an oracle database, I am trying to query the database and route it to file.
But the records instead of coming in a single line, are coming in three lines.
Can you please help me.. in this..
sqlplus -s $SRMUserid/$SRMPassword@$SRMServer<< EOF >log.out;
select * from... (5 Replies)
Discussion started by: mac4rfree
5 Replies
8. Shell Programming and Scripting
I have the following data file.
zz=aa azxc-1234 aa=aa
zz=bb azxc-1234 bb=bb
zz=cc azxc-1234 cc=cc
zz=dd azxc-2345 dd=dd
zz=ee azxc-2345 ee=ee
zz=ff azxc-3456 ff=ff
zz=gg azxc-4567 gg=gg
zz=hh azxc-4567 hh=hh
zz=ii azxc-4567 ii=ii
I want to make 2nd field pattern matching multiple lines... (13 Replies)
Discussion started by: VTAWKVT
13 Replies
9. Shell Programming and Scripting
hey gents,
I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Discussion started by: mitch
8 Replies
10. Shell Programming and Scripting
Hello,
How can I take the following output:
outputa
outputb
outputc
and turn it into single line ouput, with a single space between each field like below:
outputa outputb outputc (7 Replies)
Discussion started by: LinuxRacr
7 Replies
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)