Sponsored Content
Top Forums Shell Programming and Scripting script to run shell command and insert results to existing xml file Post 80890 by littlejon on Friday 12th of August 2005 04:57:24 PM
Old 08-12-2005
Thanks to both Ygor and Aigles. I went with Aigles' suggestion and it worked like a charm. Of course, I tweaked it to meet my needs. I was originally trying to use standard programming techniques to solve this problem. I am now officialy amazed at the power of sed and shell programming. Thank you, again! And, thanks to unix.com for the forum!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Shell script to append a time for the existing error log file

Hi Guys, the requirement is like this, i am having a error log file in this format, 4594.493: parallel nursery GC 2594592K->2544691K (2969600K), 30.848 ms 4605.958: parallel nursery GC 2634887K->2584986K (2969600K), 38.900 ms 4619.079: parallel nursery GC 2822555K->2774812K... (12 Replies)
Discussion started by: gsprasanna
12 Replies

2. Shell Programming and Scripting

How to remove xml namespace from xml file using shell script?

I have an xml file: <AutoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Table1> <Data1 10 </Data1> <Data2 20 </Data2> <Data3 40 </Data3> <Table1> </AutoData> and I have to remove the portion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" only. I tried using sed... (10 Replies)
Discussion started by: Gary1978
10 Replies

3. Shell Programming and Scripting

how to insert text between lines of an existing file using perl

Hi , I need some inputs on how to open a file (file.txt) and parse the text example aaa of the file and bbb of the file and add the text zzzz once i parse (aaa and bbb) and followed by the remaining of the text as it is in the file using perl programming. Thanks in advance (3 Replies)
Discussion started by: madhul2002
3 Replies

4. Shell Programming and Scripting

insert pipes for existing and non-existing records

I have a source file like this, L4058S462 34329094 F51010141TK1070000483L4058S462 34329094 0232384840 381892 182 5690 L4058S462 34329094 F51020141FIRST CLEARING, LLC A/C 3432-9094 L4058S462 34329094 F51030141JOHAN HOLMQVIST ... (1 Reply)
Discussion started by: saravanamr
1 Replies

5. Shell Programming and Scripting

Insert shell command into first line of output file

How can I insert the command executed on the shell into the first line of my output file? For example if I execute; zcat *.gz |grep “User5501” > users.out How can I make my users.out look like; zcat *.gz |grep “User5501” > users.out User5501 PA User5501 UA User5501 ZA... (3 Replies)
Discussion started by: lewk
3 Replies

6. Shell Programming and Scripting

How to add Xml tags to an existing xml using shell or awk?

Hi , I have a below xml: <ns:Body> <ns:result> <Date Month="June" Day="Monday:/> </ns:result> </ns:Body> i have a lookup abc.txtt text file with below details Month June July August Day Monday Tuesday Wednesday I need a output xml with below tags <ns:Body> <ns:result>... (2 Replies)
Discussion started by: Nevergivup
2 Replies

7. Shell Programming and Scripting

Read xml file till script finds separation and run again for next input and so on

Hi All, I have one query, I managed to run script with user inputs through command line or with 1 file. But I need to read a txt file/xml file in which user can mention multiple sets of answers and script should run for each set till it reach the EOF. Thanks in advance for example, the file... (3 Replies)
Discussion started by: rv_champ
3 Replies

8. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

9. UNIX for Beginners Questions & Answers

Grepping multiple XML tag results from XML file.

I want to write a one line script that outputs the result of multiple xml tags from a XML file. For example I have a XML file which has below XML tags in the file: <EMAIL>***</EMAIL> <CUSTOMER_ID>****</CUSTOMER_ID> <BRANDID>***</BRANDID> Now I want to grep the values of all these specified... (1 Reply)
Discussion started by: shubh752
1 Replies

10. UNIX for Beginners Questions & Answers

How to insert subnode in xml file using xmlstarlet or any other bash command?

I have multiple xml files where i want to update a subnode if the subnode project points to different project or insert a subnode if it doesn't exist using a xmlstarlet or any other command that can be used in a bash script. I have been able to update the subnode project if it doesn't point to... (1 Reply)
Discussion started by: Sekhar419
1 Replies
clm meet(1)							  USER COMMANDS 						       clm meet(1)

  NAME
      clm meet - compute the intersection of a set of clusterings.

      clmmeet  is not in actual fact a program. This manual page documents the behaviour and options of the clm program when invoked in mode meet.
      The options -h, --apropos, --version, -set, --nop are accessible in all clm modes. They are described in the clm manual page.

  SYNOPSIS
      clm meet [-o fname (output file name)] [-h (print synopsis, exit)] [--apropos (print synopsis,  exit)]  [--version  (print  version,  exit)]
      <file name>+

  DESCRIPTION
      clm  meet  computes the intersection of a set of clusterings, that is, the largest clustering that is a subclustering of all the clusterings
      in the set. It stores the intersection (or meet) in the argument to the -o flag, which must be the first option given.  All remaining  argu-
      ments  are  interpreted  as  names of files containing clusterings in mcl format (see mcxio(5)), which must all pertain to a set of the same
      cardinality.

      This utility can be useful in measuring (in conjunction with clm dist) the consistency of a set of clusterings at different levels of granu-
      larity  -  if  the meet of all those clusterings is close to being a subclustering of each of them, consistency is good. See clm dist for an
      example.

  OPTIONS
      -o fname (output file name)

  AUTHOR
      Stijn van Dongen.

  SEE ALSO
      mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.

  clm meet 12-068						      8 Mar 2012							 clm meet(1)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy