05-07-2011
Also worked
Now for my last two questions on this topic:
1. Is there a way to apply this only to the first, second whatever occurence of finding the strings localhost and Documents in the file ? (not all inisde the file ?)
2. (unlikely), is there a plist parser for shell or awk ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Im trying to update some properties files with text from another file:
file1
user=xyz
file2
user=
after script
file2
user=xyz
Im using this reading the $QUARTZURL,ETC... from quartz.properties:
echo... (1 Reply)
Discussion started by: mc1392
1 Replies
2. Shell Programming and Scripting
Input file - tmp
<begin>
./00003/
./00004/
<end>
I would like to replace "." with the value of pwd
so that the output will look like
/dev/project/00003/
t=`pwd`
sed -e "s/\./$t/g" tmp > tmp1;
The above piece of code is not working. Appreciate your help. (4 Replies)
Discussion started by: lotto_123
4 Replies
3. Shell Programming and Scripting
Hi All,
I just need to do find and replace in a file....
say for eg I have the input file like below:
in.txt
#####
oldtextoldtext
oldtext
oldtext
oldtext
oldtext123
oldtext-
oldtext
I need to replace oldtext to newtext... my output file should come like below..
out.txt... (9 Replies)
Discussion started by: askumarece
9 Replies
4. Shell Programming and Scripting
I am trying to take the two line version of this:
mv myFile.txt myFile.txt.bak
sed 's/foo/bar/g' myFile.txt.bak > myFile.txt
and make it into a shell script with three parameters. First two parameters are the string and string replacement and the third is file. So far this is what I have... (5 Replies)
Discussion started by: gordonheimer
5 Replies
5. Shell Programming and Scripting
Hi,
Can anyone help with a effective solution ?
I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces.
The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Discussion started by: dc18
7 Replies
6. Shell Programming and Scripting
The code below gives the string "test1.txt" even though "tessdsdt" does not match "test1.txt". I would like to return "" if there is no match and return some kind of error that I can capture and decide what to do.
echo test1.txt | awk -v src="tessdsdt" -v dst="test" '{sub(src,dst); print}' (16 Replies)
Discussion started by: kristinu
16 Replies
7. Shell Programming and Scripting
Well, to make another post at this helpful forum :b::D:
I recently tried something like this, I want to replace all those numberings/letters that are located
between <string>file://localhost/var/mobile/Applications/ and /Documents/</string>
numberings =----
replace with:
first... (6 Replies)
Discussion started by: pasc
6 Replies
8. Shell Programming and Scripting
Hi,
I am new to unix. I need to insert a variable which contains some lines of text into a text file after fixed number of lines..
Please help me on this..
Thanks in Advance,
Amrutha (3 Replies)
Discussion started by: amr89
3 Replies
9. Shell Programming and Scripting
Hallo Everyone.
I have to admit I'm shell scripting illiterate . I need to find certain strings in several text files and replace each of the string by unique & corresponding text.
I prepared a csv file with 3 columns: <filename>;<old_pattern>;<new_pattern>
... (5 Replies)
Discussion started by: gordom
5 Replies
10. Shell Programming and Scripting
I would like to use printf (or something else?) to create a line of text that has varying column widths. This will be used to create a fixed width file (with varying column widths). For example, consider variables $1 $2 $3 are equal to a, b, c respectively and they should be printed in column... (10 Replies)
Discussion started by: farrenthorpe
10 Replies
LEARN ABOUT DEBIAN
tm::serializable::ltm
TM::Serializable::LTM(3pm) User Contributed Perl Documentation TM::Serializable::LTM(3pm)
NAME
TM::Serializable::LTM - Topic Maps, trait for parsing of LTM instances.
SYNOPSIS
# this is not an end-user package
# see the source of TM::Materialized::LTM
DESCRIPTION
This package provides parsing functionality for LTM 1.3 instances with the exceptions listed below. LTM 1.3 is backwards compatible with
version 1.2. As LTM 1.3 is not yet public, please contact the author (Lars M. Garshol) for a copy.
http://www.ontopia.net/download/ltm.html
Deviations from the LTM Specification
comments:
The parser does NOT recognizes nested comments. Any closest following */ sequence terminates a comment. The parser does also not
distinguish between comments within or outside strings.
Justification: Speed of parsing and complexity of the parser.
scope:
Only exactly ONE topic can be specified for a scope.
Justification: Multiple topics per scope are allowed by the standard, but are undefined in their semantics. The underlying TM
representation does NOT allow for multiple topics per scope.
variants
Variants are currently not supported. This also includes sort names and display names.
Justification: Will be added later.
syntax
Any number of statements are allowed in LTM files (also 0).
Justification: There is no reason to do otherwise.
TOPICMAP directive
This is currently not implemented.
Justification: There are better ways to do that.
MERGEMAP directive
The HyTime, ISO13250 format is not implemented as there is currently no driver in the TM suite.
Justification: As long as there is no interest (read: bribe money), it never will.
BASEURI directive
BASEURI is currently not honored for all local URIs.
Justification: I do not understand its purpose.
encoding
This is currently ignored.
Justification: Will be added later.
Subject Locators
It is a violation to use more than one subject locator per topic.
Justification: This is enforced by the underlying model.
Source Locators
No source locators are created.
Justification: There is no such concept (thankfully) in the TM suite.
role type:
If a role is not specified, it will remain default to "thing" and not - as the specification mandates - will be substituted by the
topic type.
Justification: First, a topic might have several types (which one to use?), secondly there might be several topics in a member and
thirdly, a role should generally NOT be the type of a member.
Notes
Merging
The parser (like any other in the TM suite) does NOT perform merging automatically. You have to trigger that explicitely with the
method "consolidate".
MERGEMAP directive
The strings determining the format are checked case-insensitive, so ASTMA and AsTMa are treated equally.
The location of the map can be defined via any URI handled by LWP::Simple. If no scheme is provided file: will be assumed.
INTERFACE
Methods
deserialize
This method tries to parse the passed in text stream as LTM instance. It will raise an exception on the first parse error.
serialize
This is not implemented.
SEE ALSO
TM
AUTHOR INFORMATION
Copyright 200[1-6], Robert Barta <drrho@cpan.org>, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2008-06-12 TM::Serializable::LTM(3pm)