Sponsored Content
Full Discussion: Sed text replacement issue.
Top Forums UNIX for Dummies Questions & Answers Sed text replacement issue. Post 302261590 by Franklin52 on Tuesday 25th of November 2008 05:58:35 AM
Old 11-25-2008
It should work, post your file within code brackets (select the code and click on the "#" above the editing window).

Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Replacement using sed

Hi I have the following file that i need to run a sed command on 1<tab>running 2<tab>running 3<tab>running 4<tab>running I want to be able to replace a line i.e the second one with '2<tab>failed'. As the first number is unique that can be used to search for the relevant line (using ^2 i... (5 Replies)
Discussion started by: handak9
5 Replies

2. UNIX for Dummies Questions & Answers

Awk/Sed One liner for text replacement

Hi group, I want to replace the occurance of a particular text in a paragraph.I tried with Sed,but Sed only displays the result on the screen.How can i update the changes in the original file??? The solution should be a one liner using awk and sed. Thanks in advance. (5 Replies)
Discussion started by: bishnu.bhatta
5 Replies

3. Shell Programming and Scripting

Need Replacement for sed

Hi Can anyone provide me the replacement of sed with xargs perl syntax for the below sed -e :a -e '/;$/!N;s/\n//; ta' -e 's/;$//' This should be without looping has to take minimal time for search (0 Replies)
Discussion started by: dbsurf
0 Replies

4. Shell Programming and Scripting

Help with sed replacement

This seems like it should be an easy problem, but I'm a noob and I can't figure it out. I'm trying to use sed, but would be happy to use anything that does the job. I am trying to trim off a fixed number of unknown characters from 2 different : delimited fields while keeping the intervening... (4 Replies)
Discussion started by: helix_w
4 Replies

5. Shell Programming and Scripting

Replacement with sed

I am trying to replace the line which has string "tablespace" not case senstive.... with below simple script: mysrcipt.sh sed "s/.*/TABLESPACE USERS/g" create_table > tmp mv tmp create_table Is there any better way to do it? If Search string tooooooo long it will be tough to code in... (4 Replies)
Discussion started by: ganeshd
4 Replies

6. Shell Programming and Scripting

SED replacement

Hi, i have a file with lines, file.txt ------- test is fun testing is better I need to replace 'test' to 'develop' and i used, a=test b=develop sed "s,$a,$b,g" -------- but i see the word 'testing' is also replaced. Need some solution. Is there any way i could replace only 'test' ? (4 Replies)
Discussion started by: giri_luck
4 Replies

7. Shell Programming and Scripting

Block of text replacement using sed

Hi, I have a requirement in which i need to replace text as below - <stringProp name="Recipe">&lt;AddGroup Name=&quot;1001&quot; Path=&quot;ServiceAdministration/Controls/1001/ServiceSwitches&quot;&gt; &lt;Param Name=&quot;AttributeName&quot; Value=&quot;HeaderManipRspIngressRuleSet&quot; Type=&quot;String&quot; /&gt; &lt;Param Name=&quot;Value&quot;... (0 Replies)
Discussion started by: abhitanshu
0 Replies

8. Shell Programming and Scripting

Text replacement with awk or sed?

Hi guys, I worked for almost a half-day for the replacement of some text automatically with script. But no success. The problem is I have hundred of files, which need to be replaced with some new text. It's a painful work to work manually and it's so easy to do it wrong. For example, I... (2 Replies)
Discussion started by: liuzhencc
2 Replies

9. Shell Programming and Scripting

Multiple Replacement in a Text File in one operation (sed/awk) ?

Hi all, Saying we have two files: 1. A "Reference File" whose content is "Variable Name": "Variable Value" 2. A "Model File" whose content is a model program in which I want to substitute "VariableName" with their respective value to produce a third file "Program File" which would be a... (4 Replies)
Discussion started by: dae
4 Replies

10. Shell Programming and Scripting

sed text replacement

Hello, I'm using Bash and Sed to replace text within a text file (1.txt) twice in one script. Using a for loop I'm initially replacing any 'apple' words with the variable 'word1' ("leg). I'm then using another for loop to replace any 'apple' words with the variable 'word2' ("arm"). This task is... (2 Replies)
Discussion started by: Flip-Flop
2 Replies
wm2(1)							      General Commands Manual							    wm2(1)

NAME
wm2 - Small, non-configurable Window Manager for X SYNOPSIS
wm2 DESCRIPTION
wm2 is a window manager for X. It provides an unusual style of window decoration and as little functionality as I feel comfortable with in a window manager. wm2 is not configurable, except by editing the source and recompiling the code, and is really intended for people who don't particularly want their window manager to be too friendly. wm2 provides: -- Decorative frames for your windows. -- The ability to move, resize, hide and restore windows -- No icons. -- No configurable root menus, buttons or mouse or keyboard bindings. -- No virtual desktop, toolbars or integrated applications. USING wm2 To run wm2, make sure you're not already running a window manager, make sure the DISPLAY variable is correctly set, and then execute the file "wm2". There are no command-line options or X resources, and there is no start-up file. If your X server doesn't support the Shape extension, wm2 will exit (and will never work on your server); if it can't find the required fonts or allocate the required colours, it will also exit (but you should be able to fix this by changing the definitions in Config.h and recompiling). Available window manipulations are: -- To focus a window: Move your mouse in the window. If you want a different focusing policy, you'll have to recompile wm2 (see the README for info). -- To raise a window: click on its tab or frame, unless you have auto-raise on focus set in Config.h. -- To move a window: make sure it's in focus, then click and drag on its tab. -- To hide a window: make sure it's in focus, then click on the button at the top of its tab. -- To recover a hidden window: click left button on the root window for the root menu, and choose the window you want. -- To start a new xterm: use the first item on root menu ("New"). -- To delete a window: make sure it's in focus, click on the button on the tab, hold the mouse button for at least a second and a half until the cursor changes to a cross, then release. (I know, it's not very easy. On the other hand, things like Windows-95 tend to obscure the fact that most windows already have a perfectly good Close option.) -- To resize a window: make sure it's in focus, then click and drag on its bottom-right corner. For a constrained resize, click and drag on the bottom-left or top-right corner of the enclosing window frame. -- To lower a window: click with the right mouse button on its tab or frame. (This was the only new feature in the second release.) -- To exit from wm2: move the mouse pointer to the very edge of the screen at the extreme lower-right corner, and click left button on the root window for the root menu. The menu should have an extra option labelled "Exit wm2"; select this. (This is a new feature in the third release.) All move and resize operations are opaque. Focus policy. This is a compile-time option. To rebuild, see the README in /usr/share/doc/wm2/README.gz CREDITS
wm2 was written by Chris Cannam, recycling a lot of code and structure from "9wm" by David Hogan (see http://www.cs.su.oz.au/~dhog/ ). 9wm is written in C, so very little of the code is used verbatim, but the intention was to reuse and a lot of the resulting code is recognis- able. (Also 9wm's minimalism was rather inspiring.) I've made enough changes to make it very probable that any bugs you find will be my fault rather than David's. wm2 also uses version 2.0 of Alan Richardson's "xvertext" font-rotation routines. The sideways tabs on the window frames were Andy Green's idea. If you want to hack the code into something else for your own amusement, please go ahead. Feel free to modify and redistribute, as long as you retain the original copyrights as appropriate. AUTHOR
Chris Cannam, cannam@zands.demon.co.uk BUGS
The principal bug is that wm2 now has too many features. That aside, if you find a bug, please report it to me (preferably with a fix). wm2(1)
All times are GMT -4. The time now is 05:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy