Sponsored Content
Top Forums Shell Programming and Scripting Gawk - Text replace - need help Post 302769747 by Baefisch on Wednesday 13th of February 2013 09:13:02 AM
Old 02-13-2013
Gawk - Text replace - need help

Hello, i am a working student and have to build a patch setup.
I have to replace 2 lines in a .txt file. Can someone help me please.

Now:
Code:
wrapper.java.mainclass=org.tanukisoftware.wrapper. WrapperSimpleApp
wrapper.java.classpath.2=../../jdk/lib/tools.jar

replace with:
Code:
#wrapper.java.mainclass=org.tanukisoftware.wrapper .WrapperSimpleApp
wrapper.java.mainclass=org.tanukisoftware.wrapper. xyz
wrapper.java.classpath.2=../../jdk/lib/*.jar

I´ve tested some examples from the internet.
I do not understand the awk or any other programming language.
Can somebody help me please?

By the way. Sorry for my bad englisch.

THX!!! Smilie

Last edited by joeyg; 02-13-2013 at 10:27 AM.. Reason: Please wrap commands and data with CodeTags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

search and replace a specific text in text file?

I have a text file with following content (3 lines) filename : output.txt first line:12/12/2008 second line:12/12/2008 third line:Y I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before. I tried using cat output.txt... (4 Replies)
Discussion started by: santosham
4 Replies

2. UNIX for Advanced & Expert Users

Replace the text between two lines with different text

I have a file which contains the following data. Parameters "CParameters" BEGIN DSSUBRECORD Name "TgtDB" Prompt "TgtDB" Default "edwdev" ParamType "0" ParamLength "0" ParamScale "0" END DSSUBRECORD MetaBag... (6 Replies)
Discussion started by: ukatru
6 Replies

3. Shell Programming and Scripting

find text but replace a text beside it

I have an html file that looks like this (this is just a part of the html file): <td colspan="3" rowspan="1" style="text-align: center; background-color: rgb(<!-- IDENTIFIER1 -->51, 255, 51);"><small><!-- IDENTIFIER2 -->UP</small></td> This is to automatically update the status of the... (4 Replies)
Discussion started by: The One
4 Replies

4. Shell Programming and Scripting

How to replace text in a file with text entered

I am trying to write a shell script that will allow the typing of a value, then using that value to replace data in a text file. I suspect I need sed. The format of the file is: Variable1:Value1 Variable2:Value2 The interaction would be something like: Shell Prompt: "Please enter the... (9 Replies)
Discussion started by: cleanden
9 Replies

5. UNIX for Dummies Questions & Answers

Joining lines of a text file using GAWK

sir... am having a data file of customer master., containing some important fields as a set one line after another., what i want is to have one set of these fields(rows) one after another in line.........then the second set... and so on... till the last set completed. ... (0 Replies)
Discussion started by: KANNI786
0 Replies

6. UNIX for Dummies Questions & Answers

JOINING MULTIPLE LINES IN A TEXT FILE USING GAWK

sir... am having a data file of customer master., containing some important fields as a set one line after another., what i want is to have one set of these fields(rows) one after another in line.........then the second set... and so on... till the last set completed. I WANT THE DATA... (0 Replies)
Discussion started by: KANNI786
0 Replies

7. Shell Programming and Scripting

Text manipulation with gawk

Hi all, I have a very long document in the following format: jkjlk cc1 dd1 cc2 dd2 cc3 dd3 and so on ... The expected result should be a table aa1 bb1;cc1;dd1 aa2 bb2;cc2;dd2 (18 Replies)
Discussion started by: Robert_M
18 Replies

8. Shell Programming and Scripting

Find and add/replace text in text files

Hi. I would like to have experts help on below action. I have text files in which page nubmers exists in form like PAGE : 1 PAGE : 2 PAGE : 3 and so on there is other text too. I would like to know is it possible to check the last occurance of Page... (6 Replies)
Discussion started by: lodhi1978
6 Replies

9. UNIX for Dummies Questions & Answers

replace text

Hello I'm trying to replace in a text file the chain by 107,192,196,207 107.207 but I can not I tried the following cat translator_swift.properties.in_modif | sed 's/107\,207/107,192,196,207/g' > translator_swift.properties.in_modif Can you help me? thanks (8 Replies)
Discussion started by: nonanov
8 Replies

10. Shell Programming and Scripting

gawk script to search and replace text in a flat file

Hi I am new to unix and newbie to this forum. I need help in writing a gawk script that search and replace particular text in a flat file. Input file text : ZIDE_CONTROL000 100000000003869920900000300000001ISYNC 000002225489 0000000002232122 20120321 16:40:53 ZIDE_RECORD000... (5 Replies)
Discussion started by: gkausmel
5 Replies
JavaServiceWrapper(1)					      General Commands Manual					     JavaServiceWrapper(1)

NAME
wrapper - Jar daemon wrapper USAGE
wrapper <command> <configuration file> [configuration properties] [...] wrapper <configuration file> [configuration properties] [...] (<command> implicitly '-c') wrapper <command> (<configuration file> implicitly 'wrapper.conf') wrapper (<command> implicitly '-c' and <configuration file> 'wrapper.conf') where <command> can be one of: -c --console run as a Console application -v --version print the wrapper's version information. -? --help print this help message -- <args> mark the end of Wrapper arguments. All arguments after the '--' will be passed through unmodified to the java application. <configuration file> is the wrapper.conf to use. Name must be absolute or relative to the location of wrapper [configuration properties] are configuration name-value pairs which override values in wrapper.conf. For example: wrapper.debug=true Please note that any file references must be absolute or relative to the location of the Wrapper executable. JAVA WRAPPER SERVICE DESCRIPTION
The Java Service Wrapper makes very easy to install a Java Application as a daemon process on Unix systems. The Wrapper monitors a JVM (Java Virtual Machine) process and automatically restarts it if it that the JVM has crashed or hung. This process takes just a few seconds once the Wrapper has decided there is a problem. It also gives the ability to handle process priority. AUTHOR
Java Service Wrapper Community Edition 32-bit 3.5.3 Copyright (C) 1999-2010 Tanuki Software, Ltd. All Rights Reserved. http://wrap- per.tanukisoftware.com This manual page was written by Remi Debay <debay.remi@gmail.com>. 10/08/2010 JavaServiceWrapper(1)
All times are GMT -4. The time now is 02:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy