Sponsored Content
Special Forums UNIX and Linux Applications GNU sed - Search and Replace problem Post 302338500 by Fishn on Tuesday 28th of July 2009 05:30:56 AM
Old 07-28-2009
Many Thanks!!

Thanks very much, it works like a dream.Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search and replace sed or tr

Hi folks, I need to search and replace specific text in a file and replace it. I have a text file that does not have any newlines or carriage returns. All newlines have been removed. Here is what I need to do. Find the exact string “DH” (quotes included) and replace it with \n”DH” (basically... (6 Replies)
Discussion started by: bridgeje
6 Replies

2. UNIX for Dummies Questions & Answers

sed search and replace

Hello Folks, Anyone know how I can replace this line in file.xml <oacore_nprocs oa_var="s_oacore_nprocs">8</oacore_nprocs> with this line <oacore_nprocs oa_var="s_oacore_nprocs">1</oacore_nprocs> using sed or awk ? Thanks for your time. Cheers, Dave (7 Replies)
Discussion started by: d__browne
7 Replies

3. UNIX for Dummies Questions & Answers

Search/Replace with Sed

Is there a way to use the sed command to 1) search a specified pattern 2) in the line where that pattern is found, replace from character N to character N+4 with a new 4-character string. Thks in advance! (5 Replies)
Discussion started by: mvalonso
5 Replies

4. Shell Programming and Scripting

Problem with sed (search/replace)

Hi, In a file FILE, the following lines appear : WORD 8 8 8 ANOTHERWORD blabla ... Directly in the prompt, if I type $sed '/WORD/s/8/10/g' FILE it replace the 8's by 10's in file : $cat FILE WORD 10 10 10 ANOTHERWORD blabla ... (9 Replies)
Discussion started by: tipi
9 Replies

5. Shell Programming and Scripting

gnu sed replace space with new line

please help in making sed singleline command i need to insert dos new line (CR LF) before " 34 matching device(s) found on \\cpu1." " 6 matching device(s) found on \\cpu7." " 102 matching device(s) found on \\mainserver." the problem is that sometimes there are both CR LF before strings and... (1 Reply)
Discussion started by: xserg
1 Replies

6. Shell Programming and Scripting

sed search and replace

hi, im new for sed, anyone can help me to these in sed command my output file.txt "aaa",a1,bbb "ddd",a1,ccc "eee",a1,www need to change a1, to "a1"," output i need "aaa","a1","bbb "ddd","a1","ccc "eee","a1","www thanks in advance fsp (2 Replies)
Discussion started by: fspalero
2 Replies

7. OS X (Apple)

GNU Sed Problem

Hi, I'm and Android developer using Mac OSX 10.7. I use Dsixda's Android Kitchen to develop my roms. I had it working fine on 10.6.8 and it still worked flawlessly when updating to 10.7. I installed Macports, and installed some packages, and then tried to run the Android Kitchen. I CD'd to the... (3 Replies)
Discussion started by: dmeadows013
3 Replies

8. UNIX for Dummies Questions & Answers

search and replace with sed

Hi All I have a simple text file and I want to be able to replace any alpha character and comma combination with any other symbol of my choice here is the text file I want to replace: pear apple ban,ana grape ",g1234," te,st1 here is how it should look afterwards: pear... (4 Replies)
Discussion started by: greg_b
4 Replies

9. Shell Programming and Scripting

Need help with search and replace using SED

Hi guys, thanks for accepting me in your forum .. I am trying to clean some hacked PHP files using SSH .. I am using this command: find . -type f -print0 | xargs -0 sed -i '/god_mod/d' <?php ... (3 Replies)
Discussion started by: wisam74us
3 Replies

10. Shell Programming and Scripting

Large search replace using sed results in memory problem.

I have one big file of size 9GB (big_file.txt). This big file has sentences and paragraphs like any usual English document. I have another file consisting of replacement strings for sed to use. The file name is replace.sed and each entry in one line looks like this: s/\<shout\>/shout/g s/\<b is... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
xcowsay(6)							   Games Manual 							xcowsay(6)

NAME
xcowsay - Display a cute cow and speech bubble. SYNOPSIS
xcowsay [-h] [-t time] [-r speed] [-d] [-f font] [text]... DESCRIPTION
Display a cow with a speech bubble containing some text. If text is specified it will be displayed in the bubble. Otherwise the text will be read from the standard input and displayed when end of file is encountered. The cow is displayed for either a fixed amount of time, or an amount of time calculated from the size of the text. Click on the cow to dis- miss it immediately. If xcowsay is started with --daemon it will fork away from the terminal and run in daemon mode. The daemon provides a DBus service uk.me.doof.Cowsay that responds to ShowCow requests. The daemon can queue up any number of requests and displays them in order. When xcowsay starts it checks to see if a daemon is running, and if it is, sends a ShowCow request and returns immediately. Otherwise xcowsay will block until the cow has disappeared. CONFIGURATION FILE
xcowsay reads a configuration file on startup. The configuration file can be stored in the XDG compliant location $XDG_CON- FIG_HOME/xcowsayrc (which will default to $HOME/.config/xcowsayrc) or in your home directory at $HOME/.xcowsayrc. If the --config=FILE command line option is passed FILE will be processed after your personal configuration file. The configuration file consists of 'option = value' pairs, one per line. The valid keys are given in the next section. For example, the following line sets display time to 10 seconds: display_time = 10000 The character '#' begins a comment which lasts until the end of the line. OPTIONS
Note that these options override any settings in the config file. -h, --help Display usage information. -t time, --time=time Display the cow for time seconds. This overrides any value set for reading_speed. The corresponding config file option is dis- play_time. -r speed, --reading-speed=speed Number of milliseconds to display the cow for each word in the input text. This is clamped to a minimum of min_display_time and a maximum of max_display_time. The defaults are 1 second and 30 seconds respectively. The corresponding config file option is read- ing_speed. -f font, --font=font Font for the speech bubble text. Accepts Pango font strings. The corresponding config file option is font. -d file, --dream=file Display an image instead of text in the cow's bubble. The dream_time config file option sets the numer of milliseconds to display the image for. The default is 10 seconds. --think Display a thought bubble instead of a speech bubble. --daemon Run xcowsay in daemon mode if DBus support has been enabled. See the description for more information. --cow-size=size Size of the cow image. Current choices are small, med, or large. The corresponding config file option is cow_size. --image=file Use a different image instead of the cow. The corresponding config file option is alt_image. --monitor=N Make the cow appear on monitor N. --at=X,Y Force that cow to appear at screen location (X,Y). The config file options are at_x and at_y. --bubble-at=X,Y Change position of bubble relative to where it would normally appear. This is most useful when combined with the alt_image option to create your own characters. The config file options are bubble_x and bubble_y. --debug Print messages about what xcowsay is doing. Useful for finding out why the daemon fails. -v, --version Print version information. AUTHOR
Written by Nick Gasson. REPORTING BUGS
Report all bugs to nick@nickg.me.uk The xcowsay home page is <http://www.doof.me.uk/xcowsay> SEE ALSO
cowsay(6) BUGS
There are a few issues I am aware of: The cow and speech bubble have jagged edges which would be improved by anti-aliasing. Very long strings will disappear off the right-hand side of the screen. This could be fixed e.g. by using Pango's word wrapping. xcowsay(6)
All times are GMT -4. The time now is 02:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy