Sponsored Content
Top Forums Shell Programming and Scripting awk - treat multiple delimiters as one Post 27396 by oombera on Friday 30th of August 2002 12:12:34 PM
Old 08-30-2002
*beaming at the praise* Smilie Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cutting a file with multiple delimiters into columns

Hi All I have recently had to start using Unix for work and I have hit brick wall with this prob.... I have a file that goes a little something like this.... EUR;EUR;EUR:USD:USD;USD;;;EUR/USD;XAU/AUD;XAU/EUR;XAU/AUD,GBP/BOB,UAD/XAU;;;1.11;2.22;3.33;4.44;5.55;6.66;;; is it possible to... (7 Replies)
Discussion started by: luckycharm
7 Replies

2. Shell Programming and Scripting

AWK with multiple delimiters

I have the following string sample: bla bla bla bla bla I would like to extract the "123" using awk. I thought about awk -F"]" '{ print $1 }' but it doesn't work Any ideas ? (7 Replies)
Discussion started by: gdub
7 Replies

3. Shell Programming and Scripting

Sorting based on multiple delimiters

Hello, I have data where words are separated by a delimiter. In this case "=" The number of delimiters in a line can vary from 4to 8. The norm is 4. Is it possible to have a script where the file could be separated starting with highest number of delimiters and ending with the lowest An... (8 Replies)
Discussion started by: gimley
8 Replies

4. Shell Programming and Scripting

Sorting problem: Multiple delimiters, multiple keys

Hello If you wanted to sort a .csv file that was filled with lines like this: <Ticker>,<Date as YYYYMMDD>,<Time as H:M:S>,<Volume>,<Corr> (H : , M, S: ) by date, does anybody know of a better solution than to turn the 3rd and 4th colons of every line into commas, sorting on four keys,... (20 Replies)
Discussion started by: Ryan.
20 Replies

5. Shell Programming and Scripting

treating multiple delimiters[solved]

Hi, I need to display the last column value in the below o/p. sam2 PS 03/10/11 0 441 Unable to get o/p with this awk code awk -F"+" '{ print $4 }' pwdchk.txt I need to display 441(in this eg.) and also accept it as a variable to treat it with if condition and take a decision.... (1 Reply)
Discussion started by: sam_bd
1 Replies

6. Shell Programming and Scripting

awk multiple delimiters

Hi Folks, This is the first time I ever encountered this situation My input file is of this kind cat input.txt 1 PAIXAF 0 1 1 -9 0 0 0 1 2 0 2 1 2 1 7 PAIXEM 0 7 1 -9 1 0 2 0 1 2 2 1 0 2 9 PAKZXY 0 2 1 -9 2 0 1 1 1 0 1 2 0 1 Till the sixth column (which is -9), I want my columns to... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

7. Shell Programming and Scripting

Editing phone number with multiple delimiters

Hello all I have a data base of information that is formatted like so: JSD4863 XXX-XX-XXXX DOE, JOHN C JR-II BISS CPSC BS INFO TECH 412/779-9445 I need the last four digits of the phone number. However, many lines contain 'garbage data' that I'm not interested in. So i used a 'for loop'... (7 Replies)
Discussion started by: smartSometimes
7 Replies

8. Shell Programming and Scripting

awk script modification - treat certain files differently

awk 'BEGIN{OFS=","} FNR == 1 {if (NR > 1) {print fn,fnr,nl} fn=FILENAME; fnr = 1; nl = 0} {fnr = FNR} /UNUSUAL/ && /\.gz/ ~ /FILENAME/ {nl++} <'{system ("gunzip -cd FILENAME")}' END ... (2 Replies)
Discussion started by: SkySmart
2 Replies

9. UNIX for Beginners Questions & Answers

How to append the multiple Delimiters up to requirement?

HI All, How to append the multiple delimiters to at end the file up to 69 fields. FinalDelimiter Count is 69 recrod Delimeter count is 10 so 69-10=59 this script will add upto 59 Delimiters to that records. this script will check each and every record in a file and append the delimiters... (4 Replies)
Discussion started by: vinod.peddiredd
4 Replies

10. Shell Programming and Scripting

Getting fields from a file having multiple delimiters

Hi All, I have a file with a single row having the following text ABC.ABC.ABC,Database,New123,DBNAME,F,ABC.ABC.ABC_APP,"@FUNCTION1("ENT1") ,@FUNCTION2("ENT2")",R, I want an output in the following format ABC.ABC.ABC DBNAME ABC.ABC.ABC_APP '@FUNCTION1("ENT1")... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
xblast(6x)																xblast(6x)

NAME
XBlast (TNT) - Multi-player "Blast the Others" game SYNOPSIS
xblast [options] DESCRIPTION
XBlast is a multi-player arcade game for X11R5/R6. The game can be played with at least two players and up to six players. It was inspired by the video/computer game Bomberman/Dynablaster which was to my knowledge first programmed for NEC's PC Engine/Turbo Grafx. Other (commer- cial) versions of the original game exist for IBM-PC, Atari ST, Amiga, NES, GameBoy and Super NES. Actualized information you can obtain on the web page: http://xblast.sourceforge.net/ Follow the link Player-Tutorials LAUNCHING XBLAST
Just type xblast in an xconsole. SOUND OPTIONS
This option is only valid when XBlast was compiled with the optional sound support. Freebsd, Linux and Sun should be supported. -ns This disables the sound support. OTHER OPTIONS
The program XBlast supports the following command-line options: -central This option starts the program as central server. -check This option verifies if all levels are loadable. PLAYING XBLAST
The idea of the game is quite simple: "There can be only one ...". So the aim is to blast away all the other players. Use your bombs to blast away the other players and certain blocks (e.g. the ?-Blocks in the 1st level). Below some of these blocks there are extras. The program XBlast can be played locally or in network. After you started XBlast it will display an intro. The next step will show you the "Main Menu". In the "Main Menu" you can decide if you want to start a local game, join a network game or host a network game. For detailed information please go to the web site. CONTROLS
The following will explain the default bindings. These keys control the first (right) player at your display: KP_8, KP_Up Player starts walking up. KP_2, KP_Down Player starts walking down. KP_4, KP_Left Player starts walking to the left. KP_6, KP_Right Player starts walking to the right. KP_5 Player stops (in the center of the next block). KP_0, KP_Insert Player drops a bomb (in the center of the current block). Return, KP_Add Player uses special function (e.g. remote control, special bombs). KP_Subtract Pause of level in Local Game. KP_Multiply Request to abort the level. KP_Divide Cancel abort request. The following keys control the second (left) player at your display: T Player starts walking up. V, B Player starts walking down. F Player starts walking to the left. H Player starts walking to the right. G Player stops (in the center of the next block). Space Player drops a bomb (in the center of the current block). Tab Player uses special function (e.g. remote control, special bombs). P Pause of level in Local Game. A Request to abort of level. Z cancel abort request. A single player can use both key sets for playing. Furthermore the following keys effect all players: P pause game, resume game after pause. Escape Go to previous menu. Please note that since XBlast 2.7.x the keybindings can be customised via Options Menu Controls (see also http://blast.sf.net/ ). EXTRA SYMBOLS
There are many extras to be found in xblast. Most of the time they can be found under blastable blocks, sometimes they are just lying around. The following extras can be found in nearly any level. You will keep these extras until you have lost all your lives or the level ends. See the web site for actualized information. Bomb (red frame) This extra increases the number of bombs you can drop by one. Flame (yellow flame) This extra increases the range of your bombs by one field. Furthermore in several levels the following symbol can be found: Skull (cyan frame) This is not really an extra, but you will be infected with an random illness when picking it up. You will be healed automatically after a certain time, or if you loose one life. Additionally you can infect other players while being ill by running past them. In many levels there is also a special extra. There will always be only one type of special extra per level and you will loose it if you loose a life. The following special extras can be found: Kick extra (moving bomb in blue frame) This extra enables you to kick bombs by running into them. Invincibility (star in golden frame) This extra makes you invincible for some time. You are not killed by explosions, stunned by moving bombs, nor infected by skulls. Global Detonator (button in deep pink frame) Picking up this extra ignites all bombs on the map. Use with care. Construction Bombs (bricks and bombs in firebrick frame) This extra gives you construction bombs as special bombs. These bombs create a blastable block when exploding. Use the special key to drop them. Remote Control (button box in spring green frame) This extra enables you to ignite all your bombs by pressing the special key. Teleport Extra (beaming player in orchid frame) This extra enables you to beam away to a random location. You must be in the center of a block to activate it. Use the special key to teleport. Airpump (clouds in sky blue frame) This extra enables you to blow away (not to blast away) bombs within a range of 2 fields. It also works when your are trapped between two bombs. Use the special key to activate it. Napalm Bombs (burning bombs in orange red frame) This extra allows you to drop a high powered napalm bomb using the special key. This bomb has a much larger explosion than normal, and is bigger if you have more Flames. If the bomb is struck with an explosion, it will explode as a normal bomb. For the large explosion to occur, it must explode on its own. Firecrackers (firecrackers in orange frame) This extra allows you to drop firecracker bombs with the special key. Firecracker bombs set off a series of explosions that can clear away a small area. One in ten firecracker bombs is high powered and clears away a much larger area. There is no way to tell if a firecracker is high powered or not until it explodes. Unlike napalm bombs there is no way to stop the firecracker explosion, although it is blocked by walls and other solid objects. Pyro bombs (firecrackers in orange frame) This extra allows you to drop pyro bombs with the special key. Pyro bombs explode with a series of small explosions that dance around the level. These explosions are blocked by walls and other bombs but are able to travel through corridors with ease. They explode randomly and cannot be controlled. Pyro bombs have the same range irrespective of how many flame extras you have. Even if the bomb is struck with an explosion it will still explode as pyro bomb. Junkie Virus (syringe in yellow green frame) This extra infects you with the junkie virus. Whilst you have the junkie virus you are randomly infected with illnesses (as if you were picking up skulls). You MUST touch other players to pass on the illness within a certain time limit or you will lose a life. Any touched players are given the junkie virus as well. There is currently no way to get rid of the junkie virus (but look for a rehabilitation centre in the next release). :) Poison (black skull in steel blue frame) This extra?! cost you one of your lives. So avoid to step on it. At least if you are not currenlty invincible. Spinner (looks like normal floor) When picking up this extra you will be stunned for some time. Your opponents might want to blast you while you are spinning. Speed (moving head in light blue frame) This extra enables you too run twice as fast as normal. Try to overtake other players and catch them between bombs. Mayhem (moving head and bomb in blue frame) This extra gives you speed and kicking. Make the best of it. Holy Grail (a grail with blue light in white frame) This extras transfers life energy to you from your opponents. Be sure you are the one to get there first. Life (head and first aid kit in red frame) This extra increases your number of lifes by one. Comes in handy while in "hot" environments. Random (question mark in light blue frame) Picking up this extra will give you one of the following extras: Speed, Poison, Invincibility, Spinner, Air Pump or Life. Avoid it if you have only one life left. Cloak (vanishing player in violet frame) This extras allows you to cloak yourself using the special key. You become invisible for all other players. The extras wears out after a certain time of use. Morph (bomb with eyes in green frame) Get this extra to morph into a bomb with the special key. You still move as a bomb although you cannot alter course while on the run. You cannot be harmed by explosions while you are a bomb. Beware not to be kicked in the wall while the level shrinks. GAME RESOURCES
These resources define the rest of the game setup of xblast. They will be taken from the following sources (in the given order): 1. internal defaults 2. the directory "~/.xblast_tnt" DISPLAY RESOURCES
These resources are read separately for each display used in xblast. They are read only from the following sources (in the given order): 1. internal defaults 2. the directory "~/.xblast_tnt" 3. the server resources of the default display (can be set using xrdb). BUGS
If you found one go to the web site and tell us. COPYRIGHT
Copyright (C) 1993-2005, Oliver Vogel. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licences as published by the Free Software Foundation; either version 2; or (at your option) any later version This program is distributed in the hope that it will be entertaining, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA AUTHORS
Oliver Vogel (Main Author) vogel@ikp.uni-koeln.de Garth Denley (Coauthor) g0denley@teaching.cs.adelaide.edu.au Norbert Nicolay (Linux Sound Support, optional) nicolay@ikp.uni-koeln.de Koen (central, SMPF, teammode on TNT, bugcatcher) EPFL Belgium Guys Skywalker (epfl port, laola, some game functions, user friendliness, Shapes) Kruno Sever (Major network review, Chat, bugcatcher) CONTRIBUTORS
Xavier Caron - x-caron@es2.fr Chris Doherty - cpdohert@teaching.cs.adelaide.edu.au Patrick Durish - dri@eup.siemens-albis.ch Keith Gillow - ...@... Rob Hite - hite@tellabs.com Christophe Kalt - kalt@hugo.int-evry.fr Joachim Kaltz - kaltz@essi.fr Laurent Marsan - mbaye@univ-mlv.fr Pierre Ramet - ramet@labri.u-bordeaux.fr Mike Schneider - schneid@tellabs.com Mark Shepherd - ...@... Rob, Simon and Tristan - ...@... Xbresse Gerfried Fuchs Rado Ifi Bombenfutter Galatius Garth Denley Stephan Natschlaeger Amilhastre Fouf ALu Larsl Stefan Stiasny Release 2.10.0 (Februar 27th 2005) xblast(6x)
All times are GMT -4. The time now is 04:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy