Sponsored Content
Full Discussion: reverse matching
Top Forums Shell Programming and Scripting reverse matching Post 302511689 by bartus11 on Thursday 7th of April 2011 10:28:55 AM
Old 04-07-2011
But then $? is useless Smilie It is set to "0" even if the string was not found, so you have to code whole solution in AWK.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reverse *

when I do $ ls z* List of all files begining with 'z'. But what if I want to do a reverse lookup. Just for interest sake ;) $ ls ztr should be same as $ ls ztr* $ ls zt* $ ls z* (2 Replies)
Discussion started by: azmathshaikh
2 Replies

2. Shell Programming and Scripting

Reverse FTP

Hi Everybody, I want to write a script in unix which will automatically FTP a .txt file from my client machine D: drive(Windows) That is I want to FTP a file from my PC to UNIX box but this should be done from UNIX box by a shell script. (i.e. I will invoke the script in UNIX and FTP will be... (4 Replies)
Discussion started by: ganesh123
4 Replies

3. Shell Programming and Scripting

How to reverse output?

hi, I have to reverse the command output like below: output: online offline disable maintening killed How to reverse this output like: killed maintening disable offline online It should be ksh script. (4 Replies)
Discussion started by: a2156z
4 Replies

4. IP Networking

Reverse DNS

Hello, I'm trying to get reverse dns to point to my domain on network but I'm failing. I am using bind dns with port 53 enabled and my ISP is mediacom. Currently my reverse dns is *.client.mchsi.com and I would like to make it example.com basically. My bind configuration I have 2 records, one... (4 Replies)
Discussion started by: GRMrGecko
4 Replies

5. Programming

String reverse

Hi all, I jus wanna print string b after reversing it. but the out put is blank. My code snippet is below. :wall: int main() { char * a, * b; b = new char; a = new char; int len, le; le = 0; cout<< " enter your string \n"; cin>> a; len = strlen(a); for(int i =... (8 Replies)
Discussion started by: vineetjoshi
8 Replies

6. Shell Programming and Scripting

reverse string matching

Guys, I am trying to find a way to achieve this. I need to print /usr/local/apche/htdocs only from the string /usr/local/apache/htdocs/file.php using the regex. The below did not work. I know a solution with normal cut, I need a way to do this with the awk regex. awk '/+file.php/' (6 Replies)
Discussion started by: anilcliff
6 Replies

7. Shell Programming and Scripting

To reverse a string

Hi All, I would like to know , how to reverse a given string example : Hi how are you Required Output: you are how HiThanks (7 Replies)
Discussion started by: santhoshks
7 Replies

8. Shell Programming and Scripting

Insert lines above matching line with content from matching

Hi, I have text file: Name: xyz Gender: M Address: "120_B_C; ksilskdj; lsudlfw" Zip: 20392 Name: KLM Gender: F Address: "65_D_F; wnmlsi;lsuod;,...." Zip:90233I want to insert 2 new lines before the 'Address: ' line deriving value from this Address line value The Address value in quotes... (1 Reply)
Discussion started by: ysrini
1 Replies

9. Shell Programming and Scripting

Compare file1 for matching line in file2 and print the difference in matching lines

Hello, I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Discussion started by: RasB15
2 Replies

10. Shell Programming and Scripting

awk to combine all matching dates and remove non-matching

Using the awk below I am able to combine all the matching dates in $1, but I can not seem to remove the non-matching from the file. Thank you :). file 20161109104500.0+0000,x,5631 20161109104500.0+0000,y,2 20161109104500.0+0000,z,2 20161109104500.0+0000,a,4117... (3 Replies)
Discussion started by: cmccabe
3 Replies
SNAKE4(6)							   Games Manual 							 SNAKE4(6)

NAME
snake4, snake4scores - Game starring a fruit-eating snake. SYNOPSIS
snake4 [-hHV] [-M file] [--help] [--highscores] [--version] [--merge-highscores=file] snake4scores DESCRIPTION
The snake4 program is my fourth implementation of the snake game, written for Unix and X11. Previous versions were written for MS-DOS. Move the snake around the screen and eat food. The snake grows in length as you eat. Avoid hitting the fence, eating lethal mushrooms and rotten food, and biting your own tail. Now and then a slim-pill will bounce around. If you eat this, you will get shorter, and you will gain bonus points for every length you loose. The bonus is also given when a round is over. When food starts blinking, it's about to rot. Rotten food is poisonous, and thus uneatable. As long as it blinks, it can still be eaten. Oh, yes - I almost forgot: You may be visited by the evil headbanger. Take my advice and run away from him before he hits you in the head! He won't stay long. The keys used to control the game are given at startup. snake4 features a site-wide highscore file. The file contains the top 200 users. Each user may appear once only in the highscore table. For technical reasons, snake4 connects to the X11 server before parsing options. This makes it impossible to eg. browse the highscore table using -H if no server is available. To be able to see the scores in such a case, snake4scores produces the same output as snake4 with option -H, but does no attempt on connecting to the X11 server. OPTIONS -h, --help Print a usage message on standard output, and exit successfully. -H, --highscores Dump the highscore list to standard output, and exit successfully. Starting snake4 with the name snake4score does the same thing, without first connecting to the X11 server. Note that this will possibly print more entries than the 20 or so that will fit within the game startup screen. -V, --version Print version information on standard output, then exit successfully. -M, --merge-highscores=file Merge separate highscore file file into the default highscore file, and exit successfully. Displays the new highscore table. This option is for the game owner or root only. X11 OPTIONS In addition to the above mentioned options, snake4 accepts the standard X11 toolkit options. AUTHOR
Sverre H. Huseby <shh@thathost.com>. 11 October 1996 SNAKE4(6)
All times are GMT -4. The time now is 07:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy