Sponsored Content
Top Forums Shell Programming and Scripting Easy Perl regular expression question Post 302282277 by applefat on Friday 30th of January 2009 12:25:20 PM
Old 01-30-2009
Beautiful!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

question about regular expression

why does * highlight everything in it... shouldn't it only highlight capital letters? (0 Replies)
Discussion started by: brentdeback
0 Replies

2. UNIX for Dummies Questions & Answers

Regular Expression Question

Hi - I am trying to ignore the following items from a list. lp0 lp11 lp12 lp14 The following code works fine, but I was wondering if there was a tidier way to write the lp regular expression? egrep -v "lp" Thanks in advance. (3 Replies)
Discussion started by: Krispy
3 Replies

3. Shell Programming and Scripting

Regular expression question

hi i need to wipe out something from giving path i have some thing like that : pwd | sed 's/.*foo//' it is working fine when I have path like : /blah/balh1/foo/moo so it erasing me all that comes before the foo including the foo but I have problem when I have dir by the name of... (7 Replies)
Discussion started by: umen
7 Replies

4. UNIX for Dummies Questions & Answers

Regular Expression question

Folks; I have 3 questions & any help with them would be really appreciated: If i have a list of directories, for example: /fs/pas/2007/4/6/2634210/admdat/examin /fs/pas/2007/4/6/2634210/admdat2/stat /fs/pas/2007/4/6/2634210/admdat3/data /fs/pas/2007/4/6/2634210/im_2/0b.dcm Now; my... (6 Replies)
Discussion started by: Katkota
6 Replies

5. UNIX for Dummies Questions & Answers

Question on Regular Expression

Folks; Could some one tell me what these 2 regular expressions mean: */(*)/* (\d\d\d\d/\d\d/\d\d/*?) (14 Replies)
Discussion started by: Katkota
14 Replies

6. UNIX for Dummies Questions & Answers

a question about a regular expression

I like to loop a list of files which named file1, file2, file3, file4, etc if I like to loop them all over for f in file1, file2, file3, file4 do echo "processing" $f done how to use a regular expression to loop file$i instead? Thank you. (4 Replies)
Discussion started by: ksgreen
4 Replies

7. Shell Programming and Scripting

Hidden Characters in Regular Expression Matching Perl - Perl Newbie

I am completely new to perl programming. My father is helping me learn said programming language. However, I am stuck on one of the assignments he has given me, and I can't find very much help with it via google, either because I have a tiny attention span, or because I can be very very dense. ... (4 Replies)
Discussion started by: kittyluva2
4 Replies

8. Programming

Perl: How to read from a file, do regular expression and then replace the found regular expression

Hi all, How am I read a file, find the match regular expression and overwrite to the same files. open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat"; open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat"; while (<DESTINATION_FILE>) { # print... (1 Reply)
Discussion started by: jessy83
1 Replies

9. UNIX for Dummies Questions & Answers

Regular Expression Question

Hello, I'm trying to rename a bunch of files that were named incorrectly. I know a little about regular expressions but I'm not very good at them. Here is the image of the file names: http://i47.tinypic.com/np2gxi.jpg I'm trying to change the 20111116 at the beginning to 20101116 for all... (2 Replies)
Discussion started by: nastyn8
2 Replies

10. UNIX for Dummies Questions & Answers

Regular expression question

Hi guys, I need a help with a query. Basically i want to know the difference between (0+01)* and ((0+01)*)* . It seems whatever string can be generated by the first RE can also be generated by second and they should essentially be same. Am i missing something? (1 Reply)
Discussion started by: srkmish
1 Replies
BATTLESTAR(6)							 BSD Games Manual						     BATTLESTAR(6)

NAME
battlestar -- a tropical adventure game SYNOPSIS
battlestar [-r] [saved-file] DESCRIPTION
battlestar is an adventure game in the classic style. However, it's slightly less of a puzzle and more a game of exploration. There are a few magical words in the game, but on the whole, simple English should suffice to make one's desires understandable to the parser. THE SETTING
In the days before the darkness came, when battlestars ruled the heavens... Three He made and gave them to His daughters, Beautiful nymphs, the goddesses of the waters. One to bring good luck and simple feats of wonder, Two to wash the lands and churn the waves asunder, Three to rule the world and purge the skies with thunder. In those times great wizards were known and their powers were beyond belief. They could take any object from thin air, and, uttering the word 'su' could disappear. In those times men were known for their lust for gold and desire to wear fine weapons. Swords and coats of mail were fashioned that could withstand a laser blast. But when the darkness fell, the rightful reigns were toppled. Swords and helms and heads of state went rolling across the grass. The entire fleet of battlestars was reduced to a single ship. SAMPLE COMMANDS
take --- take an object drop --- drop an object wear --- wear an object you are holding draw --- carry an object you are wearing put on --- take an object and wear it take off -- draw an object and drop it throw <object> <direction> ! <shell esc> IMPLIED OBJECTS
>-: take watermelon watermelon: Taken. >-: eat watermelon: Eaten. >-: take knife and sword and apple, drop all knife: Taken. broadsword: Taken. apple: Taken. knife: Dropped. broadsword: Dropped. apple: Dropped. >-: get knife: Taken. Notice that the "shadow" of the next word stays around if you want to take advantage of it. That is, saying "take knife" and then "drop" will drop the knife you just took. SCORE &; INVEN The two commands ``score'' and ``inven'' will print out your current status in the game. SAVING A GAME
The command ``save'' will save your game in a file called .Bstar in your home directory by default. You can recover a saved game by using the -r option when you start up the game, or by giving the name of the saved file as an argument. Save files will be saved to and restored from your home directory unless a path is specified - i.e., ``battlestar -r savedgame'' will look for savedgame in your home directory, but ``battlestar -r ./savedgame'' will look in the current directory. ``battlestar -r'' will look for the default file, .Bstar in your home directory. DIRECTIONS
The compass directions N, S, E, and W can be used if you have a compass. If you don't have a compass, you'll have to say R, L, A, or B, which stand for Right, Left, Ahead, and Back. Directions printed in room descriptions are always printed in R, L, A, and B relative direc- tions. HISTORY
I wrote Battlestar in 1979 in order to experiment with the niceties of the C Language. Most interesting things that happen in the game are hardwired into the code, so don't send me any hate mail about it! Instead, enjoy art for art's sake! AUTHORS
David Riggle INSPIRATION &; ASSISTANCE Chris Guthrie Peter Da Silva Kevin Brown Edward Wang Ken Arnold & Company BUGS
Countless. FAN MAIL
Send to edward%ucbarpa@berkeley.arpa, chris%ucbcory@berkeley.arpa, riggle.pa@xerox.arpa. BSD
September 7, 2000 BSD
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy