Sponsored Content
Top Forums Shell Programming and Scripting Removing characters from a string Post 73720 by r2007 on Friday 3rd of June 2005 12:35:58 PM
Old 06-03-2005
FileName=`find . -mtime +0 -name '[A-Z]*' -printf '%f\n'`
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing characters from end of $string

I am writing a script to search PCL output and append more PCL data to the end accordingly. I need to remove the last 88 bytes from the string. I have searched for a few hours now and am coming up with nothing. I can't use head or tail because the PCL output is all on one line. awk crashes on... (3 Replies)
Discussion started by: craig2k
3 Replies

2. Shell Programming and Scripting

Help with removing characters like ^M

I have few files in unix which are in dos format. While I am copying these files, ^M, ^@, etc characters are being generated. I tried dos2unix command in Linux and it doesn't work. I tried sed to remove these characters but they won't go. I came to about this 'tr' command and tried to use it... (16 Replies)
Discussion started by: chiru_h
16 Replies

3. HP-UX

Removing ^D and ^H characters

Hi, I have a very huge file and it contains some unprintable characters like ^H and ^D. If I try to remove using cat test1.ser| tr -d '\136 110'>newfile1 it is only removing ^and all spaces in the file. How can I remove these characters (^D ^H) and keep my spaces as it is? Thanks &... (1 Reply)
Discussion started by: arsheshadri
1 Replies

4. UNIX for Dummies Questions & Answers

removing characters

Hi all, Any help on how to do the following? :eek: I have an infile as follows: _thisishowyouwritehelloworld _thisisalsohowyouwritehelloworld2 I want to delete the characters from "_" to "how" and be left with: youwritehelloworld youwritehelloworld2 I am able to do delete from a... (2 Replies)
Discussion started by: dr_sabz
2 Replies

5. UNIX for Advanced & Expert Users

Removing ^M characters

hi I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed. Please help as how to get rid of these. This conv.pl is going to get schduled... (0 Replies)
Discussion started by: infyanurag
0 Replies

6. UNIX for Dummies Questions & Answers

Removing ^M characters

hi I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed. Please help as how to get rid of these. This conv.pl is going to get schduled... (5 Replies)
Discussion started by: infyanurag
5 Replies

7. Shell Programming and Scripting

Removing ^M characters from a file

Hi, I want to removing ^M characters from a file and combine the line with the next line. ex: issue i have: ABC^M^M DEF solution i need: ABCDEF I found that you by using the following command you can remove new line characters. tr -d '\r' < infile.csv > outfile.csv still... (10 Replies)
Discussion started by: mwrg
10 Replies

8. UNIX for Dummies Questions & Answers

Removing characters from end of string

Hello, I have records like below that I want to remove any five characters from the end of the string before the double quotes unless it is only an asterik. 3919,5020 ,04/17/2012,0000000000006601.43,,0000000000000000.00,, 132, 251219,"*" 1668,0125 ... (2 Replies)
Discussion started by: jyoung
2 Replies

9. Shell Programming and Scripting

Removing last and first characters in a file

bash-3.00$ cat temp.txt ./a/REA01/ces1/apps/ces_ces1_init3_aa.ear/ces.war/WEB-INF/classes/reds/common/environment.properties ./a/REA01/ces1/apps/ces_ces1_init3_aa.ear/commonproperties/hi/HostIntegration.properties... (9 Replies)
Discussion started by: bhas85
9 Replies

10. Shell Programming and Scripting

Outputting characters after a given string and reporting the characters in the row below --sed

I have this fastq file: @M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86 GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA +test-1 GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
Discussion started by: Xterra
10 Replies
xmerl_xsd(3erl) 					     Erlang Module Definition						   xmerl_xsd(3erl)

NAME
xmerl_xsd - Interface module for XML Schema vlidation. DESCRIPTION
Interface module for XML Schema vlidation. It handles the W3.org specifications of XML Schema second edition 28 october 2004. For an intro- duction to XML Schema study part 0. An XML structure is validated by xmerl_xsd:validate/[2,3]. DATA TYPES
global_state() : The global state of the validator. It is representated by the #xsd_state{} record. option_list() : Options allow to customize the behaviour of the validation. Possible options are : {tab2file,boolean()} : Enables saving of abstract structure on file for debugging purpose. {xsdbase,filename()} : XSD Base directory. {fetch_fun,FetchFun} : Call back function to fetch an external resource. {fetch_path,PathList} : PathList is a list of directories to search when fetching files. If the file in question is not in the fetch_path, the URI will be used as a file name. {state,State} : It is possible by this option to provide a state with process information from an earlier validation. EXPORTS
file2state(FileName) -> {ok, State} | {error, Reason} Types State = global_state() FileName = filename() Reads the schema state with all information of the processed schema from a file created with state2file/[1,2] . The format of this file is internal. The state can then be used validating an XML document. format_error(L::Errors) -> Result Types Errors = error_tuple() | [error_tuple()] Result = string() | [string()] Formats error descriptions to human readable strings. process_schema(Schema) -> Result Equivalent to process_schema(Schema, []) . process_schema(Schema, Options) -> term() process_schemas(Schemas) -> Result Equivalent to process_schema(Schemas, []) . process_schemas(Schemas, Options) -> term() process_validate(Schema, Xml::Element) -> Result Equivalent to process_validate(Schema, Xml, []) . process_validate(Schema, Xml, Opts) -> term() state2file(S::State) -> ok | {error, Reason} Same as state2file(State,SchemaName) The name of the saved file is the same as the name of the schema, but with .xss extension. state2file(S::State, FileName) -> ok | {error, Reason} Types State = global_state() FileName = filename() Saves the schema state with all information of the processed schema in a file. You can provide the file name for the saved state. FileName is saved with the .xss extension added. validate(Xml::Element, State) -> Result Equivalent to validate(Element, State, []) . validate(Xml::Element, State, Opts::Options) -> Result Types Element = XmlElement Options = option_list() Result = {ValidElement, global_state()} | {error, Reasons} ValidElement = XmlElement State = global_state() Reasons = [ErrorReason] | ErrorReason Validates a parsed well-formed XML element (Element). A call to validate/2 or validate/3 must provide a well formed parsed XML element #xmlElement{} and a State, global_state() , which holds necessary information from an already processed schema. Thus validate enables reuse of the schema information and therefore if one shall validate several times towards the same schema it reduces time consumption. The result, ValidElement, is the valid element that conforms to the post-schema-validation infoset. When the validator finds an error it tries to continue and reports a list of all errors found. In those cases an unexpected error is found it may cause a single error reason. Usage example: 1>{E,_} = xmerl_scan:file("my_XML_document.xml"). 2>{ok,S} = xmerl_xsd:process_schema("my_XML_Schema.xsd"). 3>{E2,_} = xmerl_xsd:validate(E,S). Observe that E2 may differ from E if for instance there are default values defined in my_XML_Schema.xsd . AUTHORS
<> xmerl 1.2.8 xmerl_xsd(3erl)
All times are GMT -4. The time now is 09:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy