Sponsored Content
Full Discussion: grep pls help..
Top Forums Shell Programming and Scripting grep pls help.. Post 66816 by esham on Thursday 17th of March 2005 04:23:54 AM
Old 03-17-2005
Quote:
Originally Posted by ZealeS
Code:
bash-2.05$ echo 'hai hail $hai thai hai'
hai hail $hai thai hai
echo 'hai hail $hai thai hai' | sed 's/\([^\$]\)hai/\1power hai/g;s/^hai/power hai/'
power hai power hail $hai tpower hai power hai
#full match#
bash-2.05$ echo 'hai hail $hai thai hai' | sed 's/\([^\$]\)\<hai\>/\1power hai/g;s/^\<hai\>/power hai/'
power hai hail $hai thai power hai


that solved my problem....

thanks a lot

it will be helpfull if you explain the usage

Quote:
sed 's/\([^\$]\)\<hai\>/\1power hai/g;s/^\<hai\>/power hai/
esham Smilie Smilie Smilie
 

10 More Discussions You Might Find Interesting

1. Linux

pls help me

we hv a big enviroment networked. we use squid proxy. access allowed by src address previously. we have win2000 network with ads. my requirement is the proxy should allow domain users only for access. how can i map my windows userdatabase with squid is there any thing specific which has 2 b... (1 Reply)
Discussion started by: sriram.s
1 Replies

2. UNIX for Dummies Questions & Answers

Need help pls

Hi, I'm a newbie. I need help on my first assignment in UNIX. 1. How do I determine the number of non-empty directories? I was told to create a variable ARCHIVE, which points to the directory that contains the archive of the messages. But I'm so dumb and I don't even know how to do this. 2. In... (1 Reply)
Discussion started by: hygsg
1 Replies

3. UNIX for Dummies Questions & Answers

Pls Help

Hi every one I have got very very bad Email, My question is: How can I get all information about that f*** Email, I do mean IP,reall name, Adress, user name, password etc... I wonder if there is any program or website that I can see that email, help me please When I used windows Xp(old... (2 Replies)
Discussion started by: Cano
2 Replies

4. UNIX for Dummies Questions & Answers

Help pls!

Hi... Why should I press F1 to start windows?! I have Xp in my computer... thx 4 help Cano (1 Reply)
Discussion started by: Cano
1 Replies

5. Shell Programming and Scripting

pls help

I have a list of variables: ss1, ss5, ss6, ss8, st2 etc. (these values are not fixed, configurable). Now, I have assigned ss5=”test”. And I want to search in the list for the string “test” to know which variable is having the value “test”. Can u pls tell me how to do this? (10 Replies)
Discussion started by: kanchan_cp
10 Replies

6. Shell Programming and Scripting

Pls Help

Hi Folks, I am new to this forum. and I just started learning shell scripting. I have a file called energy.out which looks like: -218213.3729 -224215.0059 -221509.3651 -221094.2627 -220660.3223 -222630.2339 -218697.8693 Now I want to calculate the average of energies and then average... (3 Replies)
Discussion started by: pkar
3 Replies

7. Shell Programming and Scripting

Pls Pls do help me

When i run this command, everything is ok. The file can be email and attached but soon after i download the file, the file cant be read. It's seem corrupted. Totally cant be read although i'm using context or wordfile. Original file generated at ek_bkup/alert/tbspace_datafile.log is OK..... ... (7 Replies)
Discussion started by: adzuanamir
7 Replies

8. UNIX for Dummies Questions & Answers

HELP PLs

I have this code: #!/bin/sh awk 'BEGIN NR == 2 repl = "PHI" $4 = repl print $0 'dryloop.txt and this code: #!/bin/sh sed -e '1s/\|$/\|COMID\|/g' -e 's/^087.*$/&PHI\|g' hl.dsldryloop > textdry.txt My code won't work. I want to change the COMID of lines starting with 087 . this is my... (15 Replies)
Discussion started by: arkhei
15 Replies

9. Homework & Coursework Questions

Help pls

How to find the ten most common words in a file (1 Reply)
Discussion started by: jass
1 Replies

10. Shell Programming and Scripting

Inconsistent `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`

i have this line of code that looks for the same file if it is currently running and returns the count. `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l` basically it is assigned to a variable ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
xshisen(6)							   Games Manual 							xshisen(6)

NAME
xshisen - Shisen-sho puzzle game for X11 SYNOPSIS
xshisen [ options ] DESCRIPTION
xshisen is a puzzle game for X11. Similar to the famous "Shang-hai", your objective is to remove all the pieces on the board. xshisen requires a pointing device like mouse. It cannot be controlled with only keyboard. RULES
The game will over when you remove all the pieces on the board. The pieces can be removed only when both of the following conditions are true. (1) The 2 pieces have the same picture (2) The 2 pieces can be connected with up to 3 lines which do not go over other pieces. It may seem difficult rule, but is easier than describing in words. "Auto-demo" mode must be very useful for you to understand the rule. Score The best scores will be recorded at xshisen-scores file under the directory specified by XSHISENLIB environment variable. X resources "libDirectory" will be valid if the environment variable is not set. Note that the score will not be recorded if you use even one of "Back", "Search", or "Restart". OPTIONS
The following command line options are available. standard Xt options xshisen accepts standard toolkit options like -display, or -iconic. -demo Auto-demo mode. You cannot play game with this mode, but the game will proceed by computer automated algorithm. This mode is quite useful for you to understand rules. -score Just displays the best score dialog and exits. -mag number Magnify main window by number times. The standard window will be 640x400. Number may be a decimal, but the range is limited from 0.5 to the display size. -fn fontlist Use fontlist for menubar and times. -large Play double sized game. Game size can be changed with menubar after you started xshisen. Each game size has independent best time records. -huge Play quadruple sized game. Game size can be changed with menubar after you started xshisen. Each game size has independent best time records. -trial Play as "Click Trial" mode. You can measure your mouse operation speed with this feature. -gravity Enable gravity effect. All the pieces above the removed pieces will fall down. RESOURCE
The following resources are available. XShisen*fitPixmap If this value is True, the initial window size will be automatically calculated with the pixmap data size. When this value is False, the initial window size is determined by the width and height resources. The pixmap data will be resized in this case. Default value is True. XShisen*width Width of the initial window. This resource is ignored when fitPixmap resource is set to True. Default value is 640. XShisen*height Height of the initial window. This resource is ignored when fitPixmap resource is set to True. Default value is 400. XShisen*scoreFile This resource specifies the score file name. This file name must not contain the directory name. Default value is "xshisen- scores". XShisen*connectLineTime The delay time in mili-second between you clicke the pair and the pair is actually removed from screen. This value should be enough big for beginners, but experts may want this value smaller in order to play quickly. Default value is 1000 mili-seconds. XShisen*connectLineColor This specifies the connection line color which appears when pieces are being removed. Default value is "blue". XShisen*connectLineWidth This specifies the connection line width in pixel. Default value is 6. XShisen*background Background color. Default value is #004000. XShisen*libraryDirectory The directory where the pixmap data and the best score file is located. This resource is ignored when you specify the XSHISENLIB environment variable. XShisen*drawing.translations Button binding setting for your mouse. Default is <Btn1Down>: #replace PickupPiece() <Btn3Down>: CancelPiece() MENU BAR AND KEYBOARD
Start (Control + D) Starts new game. The pieces are located at random position. Restart (Control + R) Restarts the current game. The time of restarted game will not be recorded as the best score. Pause (Control + P) Pauses the game. The time count will be stopped, but also the pieces picture will be hidden. You can resume your game to do "Pause" again. Exit Exits the Shisen-sho. Search (F1) Teaches the pair you can remove now. You can use "Search" anytime, but the time will not be recorded as the best score if you use "Search" even once. Back (F5) Backs one step. The time will not be recorded if you use "Back". MOUSE CONTROL
The following mouse control is available. You can change mouse button bindings with XShisen*drawing.translations resource. Button 1 Specifies the piece to remove. You can cencel the selection when you click the selected piece again. Button 3 Cancels the selected piece. You can use button 3 after "Search", which cancels the search result. AUTHORS
Shisen-sho for X11: Masaoki Kobayashi Picture: Takayuki Akiyama COPYRIGHT
XShisen Copyright 1995,1996,1999,2002 by Masaoki Kobayashi <masaoki@techfirm.co.jp>. Picture#1 Copyright by Takayuki Akiyama <taco3@ybb.ne.jp>. Picture#2 Copyright by Mario Weilguni <mweilguni@sime.com>. See LICENSE file for detail. X Version 11 Oct 6, 1995 xshisen(6)
All times are GMT -4. The time now is 06:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy