Sponsored Content
Top Forums UNIX for Advanced & Expert Users Shell script failing to read large Xml record-urgent critical help Post 302204695 by bakunin on Thursday 12th of June 2008 09:24:25 AM
Old 06-12-2008
To give you sound advice it would be necessary to know what the script is, what your input data is and what your desired output is. Post it here (not *all* the data, just a significant sample) and we will think about it.

Lacking any info the best we can do is tell you some generalized hints which may or may not help in your specific case. Here is one: Probably the several sed-calls could be combined to one single script if they are piped one into another. This might speed things considerably.

Another one: maybe you are doing something context-oriented. sed is poor in that and maybe some of its shortcomings are covered by shell constructs. If this is the case you might be better of writing the whole in awk, which will be slower than sed in what sed can do well, but faster than sed and some shell constructs connected in a pipeline.

(For instance: if you try to cut out some part of every line sed is probably faster than then often-seen "awk '{print $5}'", but if the part you are cutting is a number and you want all these numbers totalled at the end than awk is quite better than cutting with sed and adding in a shell loop.)

bakunin
 

10 More Discussions You Might Find Interesting

1. AIX

allocate memory for shell script at runtime during execution--urgent critical help!!

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies

2. UNIX for Dummies Questions & Answers

allocate memory for a shell script at runtime--urgent critical help!!!

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (3 Replies)
Discussion started by: aixjadoo
3 Replies

3. UNIX for Advanced & Expert Users

Allocate memory for a shell script in Aix at runtime-urgent critical

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies

4. UNIX for Advanced & Expert Users

How to read an Xml record contained in a file--urgent

Hi I have an xml file which has multiple xml records.. I don't know how to read those records and pipe them to another shell command the file is like <abc>z<def>y<ghi>x........</ghi></def></abc> (1st record) <jkl>z<mno>y<pqr>x........</pqr></mno></jkl> (2nd record) Each record end... (4 Replies)
Discussion started by: aixjadoo
4 Replies

5. Shell Programming and Scripting

Urgent!! : How to read very long line using shell script

I have to fix files with only one huge line. Basically this line contains huge number of records may be in thousands of fix length. Suppose if we consider the length of one record as 100 bytes and if we have 50 such record. Then the file will have only one line with 100*50 bytes. I want to... (3 Replies)
Discussion started by: hrvispute
3 Replies

6. UNIX for Advanced & Expert Users

Shell Script to read XML tags and the data within that tag

Hi unix Gurus, I am really new to Unix Scripting. Please help me to create a shell script which reads the xml file and from that i need to fetch a particular information. For example <SOURCE BUSINESSNAME ="" DATABASETYPE ="Teradata" DBDNAME ="DWPROD3" DESCRIPTION ="" NAME... (2 Replies)
Discussion started by: SmilePlease
2 Replies

7. Shell Programming and Scripting

Shell Script to read XML file

Hi unix Gurus, I am really new to Unix Scripting. Please help me to create a shell script which reads the xml file and from that i need to fetch a particular information. For example <SOURCE BUSINESSNAME ="" DATABASETYPE ="Teradata" DBDNAME ="DWPROD3" DESCRIPTION ="" NAME... (5 Replies)
Discussion started by: SmilePlease
5 Replies

8. Red Hat

How to read an xml file through shell script?

Hey , can we read an xml file and make changes in it through shell script. Thanks (4 Replies)
Discussion started by: ramsavi
4 Replies

9. Shell Programming and Scripting

Read xml tags and then remove the tag using shell script

<Start> <Header> This is header section </Header> <Body> <Body_start> This is body section <a> <b> <c> <st>111</st> </c> <d> <st>blank</st> </d> </b> </a> </Body_start> <Body_section> This is body section (3 Replies)
Discussion started by: RJG
3 Replies

10. UNIX for Beginners Questions & Answers

UNIX shell script required to read two columns from xml

Hello All, I am new to unix scripting. I need to read FROMINSTANCE, FROMFIELD from below XML code and need to write a script for insert into SQ_EPIC values( "DID", "PROJECT_NAME") Select DID, PROJECT_NAME from EPIC<CONNECTOR TOINSTANCETYPE="Source Qualifier" TOINSTANCE="SQ_EPIC" TOFIELD="DID"... (7 Replies)
Discussion started by: sekhar.lsb
7 Replies
CODE_SATURNE(1) 					       Code_Saturne commands						   CODE_SATURNE(1)

NAME
code_saturne - Main user script of Code_Saturne. SYNOPSIS
code_saturne [-h|--help] <command> DESCRIPTION
The code_saturne script is the main user script of Code_Saturne. OPTIONS
-h, --help Help message. COMMANDS
Further information will be obtain with code_saturne <command> --help check_consistency The code_saturne check_consistency command checks the consistency between the user files and the Xml file (from the Graphical User Interface) provided by the user and, if needed, that the chosen options are compatible with parallel calculations. Lastly, it prints the chosen specific physics. check_mesh The code_saturne check_mesh command verify the quality of a given mesh. The following options will be passed to Code_Saturne pre- processor. compile The code_saturne compile command can be used to generate the cs_solver executable needed for running a Code_Saturne study. create The code_saturne create command sets up a directory structure for a Code_Saturne study or case. The different directories created are MESH for meshes, POST for user post-processing and a case directory (or several) containing a DATA, SRC (to store user files), RESU (to store results) and SCRIPTS directory. info The code_saturne info command is a wrapper for an easier look at Code_Saturne documentation. SEE ALSO
cs_io_dump(1), cs_partition(1), cs_preprocess(1), cs_solver(1) 2009-10-27 CODE_SATURNE(1)
All times are GMT -4. The time now is 04:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy