Sponsored Content
Top Forums Shell Programming and Scripting search for a string ,replace the whole line with new line Post 302222533 by kkraja on Thursday 7th of August 2008 02:17:06 AM
Old 08-07-2008
Hi Franklin,
Thanks a lot, this code gives me the changes made in first.properties in display,but the file remains the same. i want to reflect the changes every time we do this command in first.properties permanently.plz help me

thanks in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to insert line break + string in vi (search & replace )

Hello all i have big test file that has allot of structure text something like this : <foo1 *.html> <blah action> somthing 1 somthing 2 </blah> </foo1 > now i will like to insert 2 more lines of text below the <blah action> so it will be like : <foo1... (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

3. UNIX for Advanced & Expert Users

Search Parameter in first line and replace next line content

Hi, I need help. I have XML file as below &lt;a n=&quot;infoLevel&quot;&gt; &lt;v s=&quot;true&quot;/&gt; &lt;/a&gt; &lt;a n=&quot;localAddr&quot;&gt; &lt;v s=&quot;server.host.com&quot;/&gt; &lt;/a&gt; &lt;a n=&quot;ListenPort&quot;&gt; &lt;v s=&quot;21111&quot;/&gt; &lt;/a&gt; I need to find variable "ListenPort" in line and then replace... (4 Replies)
Discussion started by: rdtrivedi
4 Replies

4. Shell Programming and Scripting

perl search and replace - search in first line and replance in 2nd line

Dear All, i want to search particular string and want to replance next line value. following is the test file. search string is tmp,??? ,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50 tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies

5. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

6. Shell Programming and Scripting

search a string in a particular column of file and return the line number of the line

Hi All, Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example : abc.txt 7000,john,2,1,0,1,6 7001,elen,2,2,0,1,7 7002,sami,2,3,0,1,6 7003,mike,1,4,0,2,1 8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies

7. Shell Programming and Scripting

Search a string,get line and replace with second field

Hi, I need to search for source path in file2 , as per file1 and if found get the next line and take the field value and put it in URL value of file1. In file1, NF is not same for all the lines. file1: <type source="/home/USER/Desktop" Dest="/home/USER/DIR1/Desktop" URL="ssh/path"/> <type... (8 Replies)
Discussion started by: greet_sed
8 Replies

8. Shell Programming and Scripting

String search and print next all lines in one line until blank line

Dear all I want to search special string in file and then print next all line in one line until blank lines come. Help me plz for same. My input file and desire op file is as under. i/p file: A1/EXT "BSCABD1_21233G1" 757 130823 1157 RADIO X-CEIVER ADMINISTRATION BTS EXTERNAL FAULT ... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies

9. Shell Programming and Scripting

Multiple line search, replace second line, using awk or sed

All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed... I have an input file similar to: &LOG &LOG Part: "@DB/TC10000021855/--F" &LOG &LOG &LOG Part: "@DB/TC10000021852/--F" &LOG Cloning_Action: RETAIN &LOG Part: "@DB/TCCP000010713/--A" &LOG &LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies

10. UNIX for Dummies Questions & Answers

Search for a string,delete the line and replace with new string in a file

Hi Everyone, I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file. I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
XSTDCMAP(1)                                                   General Commands Manual                                                  XSTDCMAP(1)

NAME
xstdcmap - X standard colormap utility SYNOPSIS
xstdcmap [-all] [-best] [-blue] [-default] [-delete map] [-display display] [-gray] [-green] [-help] [-red] [-verbose] DESCRIPTION
The xstdcmap utility can be used to selectively define standard colormap properties. It is intended to be run from a user's X startup script to create standard colormap definitions in order to facilitate sharing of scarce colormap resources among clients. Where at all possible, colormaps are created with read-only allocations. OPTIONS
The following options may be used with xstdcmap: -all This option indicates that all six standard colormap properties should be defined on each screen of the display. Not all screens will support visuals under which all six standard colormap properties are meaningful. xstdcmap will determine the best allocations and visuals for the colormap properties of a screen. Any previously existing standard colormap properties will be replaced. -best This option indicates that the RGB_BEST_MAP should be defined. -blue This option indicates that the RGB_BLUE_MAP should be defined. -default This option indicates that the RGB_DEFAULT_MAP should be defined. -delete map This option specifies that a specific standard colormap property, or all such properties, should be removed. map may be one of: default, best, red, green, blue, gray, or all. -display display This option specifies the host and display to use; see X(7). -gray This option indicates that the RGB_GRAY_MAP should be defined. -green This option indicates that the RGB_GREEN_MAP should be defined. -help This option indicates that a brief description of the command line arguments should be printed on the standard error. This will be done whenever an unhandled argument is given to xstdcmap. -red This option indicates that the RGB_RED_MAP should be defined. -verbose This option indicates that xstdcmap should print logging information as it parses its input and defines the standard colormap prop- erties. ENVIRONMENT
DISPLAY to get default host and display number. SEE ALSO
X(7) AUTHOR
Donna Converse, MIT X Consortium X Version 11 xstdcmap 1.0.2 XSTDCMAP(1)
All times are GMT -4. The time now is 10:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy