Sponsored Content
Top Forums Shell Programming and Scripting UNIX shell script to format output report Post 302916537 by treesloth on Wednesday 10th of September 2014 01:52:39 PM
Old 09-10-2014
Quote:
Originally Posted by crefi1545
thanks treeslouth,
need an output in the following format, could you please help me...

example:
Code:
XML File name | list of matching string | count
abc.xml          | abc file                       | 2
                      | xyz file                       |
xyz.xml           | ccc file                       | 1

Moderator's Comments:
Mod Comment CODE tags are crucial to make column alignment visible.
So you mention "list of matching string". Are there multiple strings that you're counting? For example, do you want to know how many times, in total, either "foo" or "bar" appear in an XML file?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unix Shell Script with output to CSV File

Hi, I have a unix shell script that is outputting results from an SQL query to a *.csv file, using utl_file.put_line. The resulting file is then sent out via e-mail as a mail attachment. The issue I have is that when the mailed attachment is opened in Excel the first column is shown as... (1 Reply)
Discussion started by: heather.morton@
1 Replies

2. Shell Programming and Scripting

Help with Output Redirection of a Unix Shell Script

Hi Guys, I have a script for which the stdout and stderr should be redirected to a log file, they should not be printed on the screen. Could you please let me know the procedure to redirect the output of the script to a log file. Thanks in advance. --- Aditya (5 Replies)
Discussion started by: chaditya
5 Replies

3. Shell Programming and Scripting

shell script to format command output

Hello team, I am running below command which is giving following output. bash-3.00$ ps -eo pid,pcpu,args | sort +1n | grep -i java 12 0.0 grep -i java 8804 0.0 /opt/app/ccr/home/ccr/WebSphere/AppServer/java/bin/sparcv9/java -XX:+UnlockDiag 9241 0.0... (7 Replies)
Discussion started by: coolguyamy
7 Replies

4. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

5. UNIX for Dummies Questions & Answers

UNIX command output format

how can I get the df -h command output into excel format or csv file. df -k | tr -s " " | sed 's/ /, /g' | sed '1 s/, / /g' | column -t df -h | column -t I have tried as above but the format is not right. I'm not able to load the format into a excel or a table. ... (2 Replies)
Discussion started by: anita81
2 Replies

6. Shell Programming and Scripting

How to echo output of a UNIX command (like ls -l ) using shell script.?

How do i echo the output of a unix command using shell script??? Like: echo /etc/ ls -l (2 Replies)
Discussion started by: sunny2802
2 Replies

7. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

8. Shell Programming and Scripting

UNIX script email to outlook report format

I have a ksh script that emails a report to outlook from a Unix Solaris. On server the report formatted perfectly. However, the email version the format is not. On the server report looks like this: TN Region Old SPiAD Server Order/Req Local Status NAAC Status Request Date New... (1 Reply)
Discussion started by: mrn6430
1 Replies

9. Shell Programming and Scripting

Shell output format like table

Hi, OS: Redhat 7.5 shell: Bash Wrote below script to login into oracle via shell script and trying to reset locked account..It works as expected. But I need specific output << EOF should go to target terminal not all out put running below script from ansible command line.. #!/bin/bash... (1 Reply)
Discussion started by: onenessboy
1 Replies

10. Programming

Python or Shell script to Grep strings from input file and output in csv format

Hi Experts, I am writing a python script to grep string from file and display output in csv file as in attached screenshot https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view Input file(result_EPFT_config_device) Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
XML::LibXML::PI(3pm)					User Contributed Perl Documentation				      XML::LibXML::PI(3pm)

NAME
XML::LibXML::PI - XML::LibXML Processing Instructions SYNOPSIS
use XML::LibXML; # Only methods specific to Processing Instruction nodes are listed here, # see XML::LibXML::Node manpage for other methods $pinode->setData( $data_string ); $pinode->setData( name=>string_value [...] ); DESCRIPTION
Processing instructions are implemented with XML::LibXML with read and write access. The PI data is the PI without the PI target (as specified in XML 1.0 [17]) as a string. This string can be accessed with getData as implemented in XML::LibXML::Node. The write access is aware about the fact, that many processing instructions have attribute like data. Therefore setData() provides besides the DOM spec conform Interface to pass a set of named parameter. So the code segment my $pi = $dom->createProcessingInstruction("abc"); $pi->setData(foo=>'bar', foobar=>'foobar'); $dom->appendChild( $pi ); will result the following PI in the DOM: <?abc foo="bar" foobar="foobar"?> Which is how it is specified in the DOM specification. This three step interface creates temporary a node in perl space. This can be avoided while using the insertProcessingInstruction() method. Instead of the three calls described above, the call $dom->insertProcessingInstruction("abc",'foo="bar" foobar="foobar"'); will have the same result as above. XML::LibXML::PI's implementation of setData() documented below differs a bit from the the standard version as available in XML::LibXML::Node: setData $pinode->setData( $data_string ); $pinode->setData( name=>string_value [...] ); This method allows one to change the content data of a PI. Additionally to the interface specified for DOM Level2, the method provides a named parameter interface to set the data. This parameter list is converted into a string before it is appended to the PI. AUTHORS
Matt Sergeant, Christian Glahn, Petr Pajas VERSION
2.0001 COPYRIGHT
2001-2007, AxKit.com Ltd. 2002-2006, Christian Glahn. 2006-2009, Petr Pajas. perl v5.14.2 2012-06-21 XML::LibXML::PI(3pm)
All times are GMT -4. The time now is 10:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy