Rewriting file paths in XML file within bash script
Hi guys,
I'm working on a large set of scripts to move files around several servers and manipulate them for our staff. Basically we're shooting things, the videos hit a server and then need organised due to the language they've been shot in. Our XML (designed for Apple's Final Cut Pro) is right obviously when captured but not when it hits the edit stations.
This is the original XML (a snippet of):
We need to rewrite this as such:
Can this be done simply with a one or two line script?
I'd rather batch rewrite so any files named DE_.something.xml would all be written to that capture scratch in the DE folder.
Thanks in advance
Edit: Just realised that I've not mentioned why I'm posting this specifically - because of the slashes present in file paths I'm not sure how to do this.
Last edited by omfgbunnies; 04-09-2010 at 09:58 AM..
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)
I need to extract all text delimited from <name> and </name> tags from an xml file, but not only first occurence. I need to extract all occurences.
I've tried with this command:
awk -F"<name>|</name>" 'NF>2{print $2}'
but it give only first occurence. How can i modify it? (18 Replies)
Dear Members,
I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input.
The contents of a single cell of INFO column is like:
Area:app - aam
Clean Up Criteria:... (0 Replies)
Hello all,
I am new to scripting and here is what I want to get done.
I need to run some processing on many files. I have a whole bunch of files among which there are a few that I am interested in. What I need to do is to write a script which reads the file paths from a text file. line by... (1 Reply)
HI All,
I have to split a xml file into multiple xml files and append it in another .xml file. for example below is a sample xml and using shell script i have to split it into three xml files and append all the three xmls in a .xml file. Can some one help plz.
eg:
<?xml version="1.0"?>... (4 Replies)
Hi All,
I have two xml files.
One is having below input
<NameValuePair>
<name>Daemon</name>
<value>tcp:7474</value>
</NameValuePair>
<NameValuePair>
<name>Network</name>
<value></value>
</NameValuePair>
... (2 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
i have some script with some paths inside it. The idea is to some files which is on desktop copy and move to another location. Problem is that inside script is similar to this:
cp test1.zip /root/help/
because I allways have another zip files, does it possible to have some input which ask me... (18 Replies)
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
LEARN ABOUT V7
intro
INTRO(3) Library Functions Manual INTRO(3)NAME
intro - introduction to library functions
SYNOPSIS
#include <stdio.h>
#include <math.h>
DESCRIPTION
This section describes functions that may be found in various libraries, other than those functions that directly invoke UNIX system primi-
tives, which are described in section 2. Functions are divided into various libraries distinguished by the section number at the top of
the page:
(3) These functions, together with those of section 2 and those marked (3S), constitute library libc, which is automatically loaded by
the C compiler cc(1) and the Fortran compiler f77(1). The link editor ld(1) searches this library under the `-lc' option. Declara-
tions for some of these functions may be obtained from include files indicated on the appropriate pages.
(3M) These functions constitute the math library, libm. They are automatically loaded as needed by the Fortran compiler f77(1). The link
editor searches this library under the `-lm' option. Declarations for these functions may be obtained from the include file
<math.h>.
(3S) These functions constitute the `standard I/O package', see stdio(3). These functions are in the library libc already mentioned.
Declarations for these functions may be obtained from the include file <stdio.h>.
(3X) Various specialized libraries have not been given distinctive captions. The files in which these libraries are found are named on
the appropriate pages.
FILES
/lib/libc.a
/lib/libm.a, /usr/lib/libm.a (one or the other)
SEE ALSO stdio(3), nm(1), ld(1), cc(1), f77(1), intro(2)DIAGNOSTICS
Functions in the math library (3M) may return conventional values when the function is undefined for the given arguments or when the value
is not representable. In these cases the external variable errno (see intro(2)) is set to the value EDOM or ERANGE. The values of EDOM
and ERANGE are defined in the include file <math.h>.
ASSEMBLER
In assembly language these functions may be accessed by simulating the C calling sequence. For example, ecvt(3) might be called this way:
setd
mov $sign,-(sp)
mov $decpt,-(sp)
mov ndigit,-(sp)
movf value,-(sp)
jsr pc,_ecvt
add $14.,sp
INTRO(3)