Sponsored Content
Full Discussion: File Separation
Top Forums Shell Programming and Scripting File Separation Post 302940271 by Nithin Kumar on Thursday 2nd of April 2015 05:08:20 PM
Old 04-02-2015
Hello Rudic, This is the actual code i am working on, Please shed some light on this issue, it will be great help

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE POWERMART SYSTEM "powrmart.dtd">
<POWERMART CREATION_DATE="04/01/20151">
<REPOSITORY NAME="INFA""Oracle">
<FOLDER NAME="zvronges" GROUP=""r"
<TABLEATTRIBUTE NAME ="Sql Query" VALUE =""/>
</FOLDER>
<FOLDER NAME="AAAETL_UTILITY_SH" GROUP="" OWNER="Administrator"
PRECISION ="30" SCALE ="0"/>
</FOLDER>
<FOLDER NAME="zvsandineni" GROUP="" OWNER="Administrator">
<SOURCE BUSINESSNAME =">
</FOLDER>
</REPOSITORY>
</POWERMART>

These are the outputs i am expecting, This should give different files based on the folder name, if the
folder name starts with "Z" , this is going to separate file, if not we shall ignore the folders



File_1
----------

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE POWERMART SYSTEM "powrmart.dtd">
<POWERMART CREATION_DATE="04/01/20151">
<REPOSITORY NAME="INFA""Oracle">
<FOLDER NAME="zvronges" GROUP=""r"
<TABLEATTRIBUTE NAME ="Sql Query" VALUE =""/>
</FOLDER>
</REPOSITORY>
</POWERMART>

File_2
----------

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE POWERMART SYSTEM "powrmart.dtd">
<POWERMART CREATION_DATE="04/01/20151">
<REPOSITORY NAME="INFA""Oracle">
<FOLDER NAME="zvsandineni" GROUP="" OWNER="Administrator">
<SOURCE BUSINESSNAME =">
</FOLDER>
</REPOSITORY>
</POWERMART>


Last edited by jim mcnamara; 04-02-2015 at 10:30 PM..
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Joining three lines with comma separation

I have a file that looks like this: G. KRESSLAR 9618 W. APPALOOSA DRIVE SUN CITY, AZ 85373 SHIRLEY ALLEN 7272 W. VIA MONTOYA DRIVE GLENDALE, AZ 85310 LOUIS VALDEZ 244441 N. 86TH AVENUE PEORIA, AZ 85383 DONNA NEWBON 3231 W. DENTON #D PHOENIX, AZ 85017 SARAH WILSON 6534 W. PALO... (3 Replies)
Discussion started by: BCarlson
3 Replies

2. Shell Programming and Scripting

Unwanted field separation in awk

Hi everyone, My problem is strange, I cannot think of why this is happening. I have a set of data that looks like this: Although it does not look it, the fields are tab delimited. I have made sure of this, and awk does recognize them as such. However, it divides what I would expect... (2 Replies)
Discussion started by: ccox85
2 Replies

3. Shell Programming and Scripting

Help need to write a script on column separation for syslog output in perl

HI Pros, I have a issue.I need to write a script to parse the logs got from syslog server and update the same in my database.I need the following output.I donot know perl and I heard it very easy to write in perl I have the sample log I need each column seperated by commas and all equals... (0 Replies)
Discussion started by: iron_michael86
0 Replies

4. Shell Programming and Scripting

nawk -- separation of records on basis of number of fields

A file file1.txt exists having records like The delimiter being "|" X|_|Y|_|Z|_| (number of fields 7) A|_|B|_| (number of fields 5) X|_|Z|_|H|_| (number of fields 7) A|_|D|_|S|_| (number of... (4 Replies)
Discussion started by: centurion_13
4 Replies

5. Shell Programming and Scripting

metacharacters separation

I have prepared a script to submit a string in a txt file. However there are somethings that I have to check before submitting the string in the txt file. One of those checks is to determine whether the string entered contains any metacharacters. I have tried sth like; echo "string" | grep -v ... (3 Replies)
Discussion started by: ozum
3 Replies

6. Shell Programming and Scripting

How to determine column separation format?

Hi there, say I have a line with multiple columns but with different separation formats: spaces, tabs.. Is it possible to have AWK print the separation format between each column? (10 Replies)
Discussion started by: la2015
10 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

Sum up formatted numbers with comma separation

I need to sum up the values in field nr 5 in a data file that contains some file listing. The 5th field denotes the size of each file and following are some sample values. 1,775,947,633 4,738 7,300 16,610 15,279 0 0 I tried the following code in a shell script. awk '{sum+=$5} END{print... (4 Replies)
Discussion started by: krishmaths
4 Replies
INTLTOOL-EXTRACT(8)					      System Manager's Manual					       INTLTOOL-EXTRACT(8)

NAME
intltool-extract - generate header files which can be read by gettext SYNOPSIS
intltool-extract [ --ini-style ] [ -X|--verbose ] [ -H|--help ] [ -V|--version ] [ --xml-style ] [ --scheme-style ] BLAH DESCRIPTION
This generates header files from the strings in the specified input files which gettext can use to merge strings into the pot file. OPTIONS
--ini-style File is of type gettext/ini. -X, --verbose Be verbose to give the user additional feedback. -H, --help Show usage and basic help information. -V, --version Show version information. -O, --xml-style File is of type gettext/xml. -O, --scheme-style File is of type gettext/scheme. REPORTING BUGS
Report bugs to http://bugzilla.gnome.org or by sending email to xml-i18n-tools@gnome.org. AUTHOR
Darin Adler <darin@bentspoon.com> Kenneth Christiansen <kenneth@gnu.org> Maciej Stachowiak <mjs@eazel.com> SEE ALSO
intltoolize(8), intltool-prepare(8), intltool-merge(8), intltool-update(8) intltool September 09, 2001 INTLTOOL-EXTRACT(8)
All times are GMT -4. The time now is 02:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy