Sponsored Content
Special Forums Windows & DOS: Issues & Discussions 2 Questions: replace text in txt file, add text to end of txt file Post 302909776 by pasc on Saturday 19th of July 2014 08:10:02 AM
Old 07-19-2014
2 Questions: replace text in txt file, add text to end of txt file

so...

Lets assume I have a text file.

The text file contains multiple "#" symbols.
  1. I want to replace all thos "#"s with a STRING using DOS/Batch
  2. I want to add a certain TEXT to the end of each line.

How can I do this WITHOUT aid of sed, grep or anything linux related ?

Last edited by rbatte1; 08-01-2014 at 06:22 AM.. Reason: Added LIST=1 tags
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl: taking text from a .txt file

How would i go about the following, I open a text document with loads of text, about 150 lines e.g. "Best Time: 02:55.88" How would i get perl just to take the time and put into a variable but also be able to take any time like that from the file?? i've done this so far to open the... (2 Replies)
Discussion started by: perleo
2 Replies

2. Shell Programming and Scripting

add text to end of text file

Hi, I assume there is a simple solution, but as usual i can't find it! How can i add a line of text to the end of a text file on a new line? i.e file.txt ________________ this is my text file ________________ file.txt ________________ this is my text file WITH A NEW LINE... (6 Replies)
Discussion started by: leeRoberts2007
6 Replies

3. Shell Programming and Scripting

Help need in modifying the text of .txt file

Hi All, I've written a shell script in which i defined two varibles for example: str=1.0.0.15 timeStamp=2008.03.08 now using this varibles i need to modify a text file. The text content looks like this ************************ * packageNumber : 1.0.0.14 * * date :... (2 Replies)
Discussion started by: vinna
2 Replies

4. Shell Programming and Scripting

Script for removing text from a txt file

Hello, So I wanted to write a very simple script to remove some information from a text file and save it as something else. For example I have a text file (let's call it txt) with three rows of numbers: 0 0 1 9 8 7 5 0 6 7 9 0 0 7 9 8 1 1 6 4 0 6 0 0 9 8 4 6 0 9 2 8 1 And I want to... (2 Replies)
Discussion started by: hertingm
2 Replies

5. Shell Programming and Scripting

Help needed in extracting text present between two headers in .txt file

Hi All, Please help me out in fllowing problem. I have text file which contains the data in following format. Contents of file.txt are setregid02 Test that setregid() fails and sets the proper errno values when a non-root user attemps to change the real or effective... (2 Replies)
Discussion started by: varshit
2 Replies

6. Solaris

Copy and paste text from a word document into a txt file in vi

Hello, Can anybody please tell me how we can copy and paste text from a word document into a text file that we are editing in vi? Is it possible to do that while we are editing the text file in vi in insert mode? Thanks, (3 Replies)
Discussion started by: Pouchie1
3 Replies

7. UNIX for Dummies Questions & Answers

Select text between current date and output to new txt file

Hi guys, brand new to this thread and very very new to UNIX...so go easy please! Anyway I have a file that looks like this: >>-------------------------------------------------------------------------- Date/Time/Eng. : 2012-06-22 / 00:26 / DS Reported problem : (SD) ... (5 Replies)
Discussion started by: martin0852
5 Replies

8. Shell Programming and Scripting

Script extract text from txt file with grep

All, I require a script that grabs some text from the gitHub API and will grep (or other function) for a string a characters that starts with (") quotes followed by two letters, may contain a pipe |, and ending with ) . What i have so far is below but it's not returning anything. ... (4 Replies)
Discussion started by: ChocoTaco
4 Replies

9. Shell Programming and Scripting

Search last column of INPUT.txt in TABLEs text and add correspond columns to INPUT.txt

Hi dears i use bash shell i have INPUT.txt like this number of columns different in one some row have 12 , some 11 columns see last column INPUT.txt CodeGender Age Grade Dialect Session Sentence Start End Length Phonemic Phonetic 63 M 27 BS/BA TEHRANI 3 4 298320 310050... (2 Replies)
Discussion started by: alii
2 Replies
Log::Report::Lexicon::PO(3pm)				User Contributed Perl Documentation			     Log::Report::Lexicon::PO(3pm)

NAME
Log::Report::Lexicon::PO - one translation definition DESCRIPTION
This module is administering one translation object. Sets of PO objects are kept in a POT file, implemented in Log::Report::Lexicon::POT. METHODS
Constructors Log::Report::Lexicon::PO->new(OPTIONS) -Option --Default automatic "" comment [] format [] fuzzy false msgid <required> msgid_plural undef msgstr "" or [] references [] automatic => PARAGRAPH Automatically added comments. See addAutomatic(). comment => PARAGRAPH Translator added comments. See addComment(). format => ARRAY-OF-PAIRS|HASH See format(). fuzzy => BOOLEAN The string is not yet translated, some smart guesses may have been made. See fuzzy(). msgid => STRING msgid_plural => STRING msgstr => STRING|ARRAY-OF-STRING The translations for the msgid. When msgid_plural is defined, then an ARRAY must be provided. references => STRING|ARRAY-OF-LOCATIONS The STRING is a blank separated list of LOCATIONS. LOCATIONs are of the form "filename:linenumber", for instance "lib/Foo.pm:42" See addReferences() Attributes $obj->addAutomatic(LIST|ARRAY|STRING) Add multiple lines to the translator's comment block. Returns an empty string if there are no comments. $obj->addComment(LIST|ARRAY|STRING) Add multiple lines to the translator's comment block. Returns an empty string if there are no comments. $obj->addFlags(STRING) Parse a "flags" line. $obj->addReferences(STRING|LIST|ARRAY) The STRING is a blank separated list of LOCATIONS. The LIST and ARRAY contain separate LOCATIONs. A LOCATION is of the form "filename:linenumber". Returns the internal HASH with references. $obj->automatic([LIST|ARRAY|STRING]) Returns a STRING which contains the cleaned paragraph of automatically added comments. If an argument is specified, it will replace the current comment. $obj->comment([LIST|ARRAY|STRING]) Returns a STRING which contains the cleaned paragraph of translator's comment. If an argument is specified, it will replace the current comment. $obj->format(LANGUAGE|PAIRS|ARRAY-OF-PAIRS|HASH) When one LANGUAGE is specified, it looks whether a "LANGUAGE-format" or "no-LANGUAGE-format" is present in the line of FLAGS. This will return 1 (true) in the first case, 0 (false) in the second case. It will return "undef" (also false) in case that both are not present. You can also specify PAIRS: the key is a language name, and the value is either 0, 1, or "undef". example: use of format() if($po->format('c')) ... unless($po->format('perl-brace')) ... if(defined $po->format('java')) ... $po->format(java => 1); # results in 'java-format' $po->format(java => 0); # results in 'no-java-format' $po->format(java => undef); # results in '' $obj->fuzzy([BOOLEAN]) Returns whether the translation needs human inspection. $obj->isActive Returns whether the translation has any references, or is the header. $obj->msgid Returns the actual msgid, which cannot be "undef". $obj->msgstr([INDEX, [STRING]]) With a STRING, a new translation will be set. Without STRING, a lookup will take place. When no plural is defined, use INDEX 0 $obj->plural([STRING]) Returns the actual msgid_plural, which can be "undef". $obj->references([STRING|LIST|ARRAY]) Returns an unsorted list of LOCATIONS. When options are specified, then those will be used to replace all currently defined references. Returns the unsorted LIST of references. $obj->removeReferencesTo(FILENAME) Remove all the references to the indicate FILENAME from the list. Returns the number of refs left. Parsing Log::Report::Lexicon::PO->fromText(STRING, [WHERE]) Parse the STRING into a new PO object. The WHERE string should explain the location of the STRING, to be used in error messages. $obj->toString(OPTIONS) Format the object into a multi-lined string. -Option --Default nr_plurals undef nr_plurals => INTEGER If the number of plurals is specified, then the plural translation list can be checked for the correct length. Otherwise, no smart behavior is attempted. $obj->unused The message-id has no references anymore and no translations. SEE ALSO
This module is part of Log-Report distribution version 0.94, built on August 23, 2011. Website: http://perl.overmeer.net/log-report/ LICENSE
Copyrights 2007-2011 by Mark Overmeer. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2012-03-02 Log::Report::Lexicon::PO(3pm)
All times are GMT -4. The time now is 05:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy