Sponsored Content
Top Forums Shell Programming and Scripting How to replace value in each field until a certain character in each record? Post 303027946 by gull04 on Friday 28th of December 2018 12:22:29 PM
Old 12-28-2018
Hi Sudhakar1987,

If this is homework then there is a seperate forum for this, if not then I would refer you back to the previous posts requesting what you've tried.

The forums here deliver help in many forms, however there is an expectation that the users will at least be prepared to share what they have already tried - other users in the main will respond with (in my experience) excellent feed back.

Everybody has to learn a bit at a time, throwing your toys out of the pram will achieve nothing - other than someone else having to pick your toys up for you!

I look forward to seeing your solution;

Regards

Gull04
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to replace field for each record

Hello, I have the following xml formatted file. I would like to get the newnumber field number and replace into customernumber for each record. For example: <XMLFORMAT> <customernumberR11>9</customernumberR11> ... (12 Replies)
Discussion started by: happyv
12 Replies

2. Shell Programming and Scripting

Replace third field of the first record in a file....

Hi, I am new to unix and am trying to do something below: I have a pipe delimited file with millions of records. I need to replace the third column of the first record to the number of lines in the file. How can I do that. Will appreciate any advice and help. Thanks Simi (3 Replies)
Discussion started by: simi28
3 Replies

3. Shell Programming and Scripting

Replace comma by space for specified field in record

Hi, i want to replace comma by space for specified field in record, i mean i want to replace the commas in the 4th field by space. and rest all is same throught the record. the record is 16458,99,001,"RIMOUSKI, QC",418,"N",7,EST,EDT,902 16458,99,002,"CHANDLER,... (5 Replies)
Discussion started by: raghavendra.cse
5 Replies

4. Shell Programming and Scripting

Count number of occurences of a character in a field defined by the character in another field

Hello, I have a text file with n lines in the following format (9 column fields): Example: contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
Discussion started by: s052866
3 Replies

5. Shell Programming and Scripting

Replace field in one file with whole record data of another

Hello Group, I need to replace the city field in “File 1 (fileld 3), with the entire record line of “File 2” (including delimiters) where the “city” field (File 1, Field 3)matches city field (File 2, Field1). All of the other data in “File 1” should remain intact(Fields 1,2,4,5,6). Only field... (1 Reply)
Discussion started by: vestport
1 Replies

6. Shell Programming and Scripting

Replace a field with a character as per the field length

Hi all, I have a requirement to replace a field with a character as per the length of the field. Suppose i have a file where second field is of 20 character length. I want to replace second field with 20 stars (*). like ******************** As the field is not a fixed one, i want to do the... (2 Replies)
Discussion started by: gani_85
2 Replies

7. Shell Programming and Scripting

Extract timestamp from first record in xml file and it checks if not it will replace first record

I have test.xml <emp><id>101</id><name>AAA</name><date>06/06/14 1811</date></emp> <Join><id>101</id><city>london</city><date>06/06/14 2011</date></join> <Join><id>101</id><city>new york</city><date>06/06/14 1811</date></join> <Join><id>101</id><city>sydney</city><date>06/06/14... (2 Replies)
Discussion started by: vsraju
2 Replies

8. Shell Programming and Scripting

Display combination of 4 field uniqe record and along with concatenate 5th and 6th field.

Table ACN|NAME|CITY|CTY|NO1|NO2 115|AKKK|ASH|IND|10|15 115|AKKK|ASH|IND|20|20 115|AKKK|ASH|IND|30|35 115|AKKK|ASH|IND|30|35 112|ABC|FL|USA|15|15 112|ABC|FL|USA|25|20 112|ABC|FL|USA|25|45 i have written shell script using cut command and awk programming getting error correct it and add... (5 Replies)
Discussion started by: udhal
5 Replies

9. Shell Programming and Scripting

Replace a string for every record after the 1st record

I have data coming in the below format for each record <?xml version="1.0" encoding="UTF-8" standalone="no"?><test_sox xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><testdetials>....</test_sox> <?xml version="1.0" encoding="UTF-8" standalone="no"?><test_sox... (8 Replies)
Discussion started by: dsravanam
8 Replies

10. Shell Programming and Scripting

How to repeat a character in a field if it's a single character?

I have a csv dataset like this : C,rs18768 G,rs13785 GA,rs1065 G,rs1801279 T,rs9274407 A,rs730012 I'm thinking of use like awk, sed to covert the dataset to this format: (if it's two character, then keep the same) CC,rs18768 GG,rs13785 GA,rs1065 GG,rs1801279 TT,rs9274407... (7 Replies)
Discussion started by: nengcheng
7 Replies
POWERMANGA(6)							   Games Manual 						     POWERMANGA(6)

NAME
powermanga - shoot-'em-up game SYNOPSIS
powermanga [OPTIONS] DESCRIPTION
Powermanga is a shoot'em up game; you will have to fight more than 60 different types of enemies. You start with a ship, and enemies show up throwing bombs at you. Shoot them, and get better weapons for your ship (otherwise, you won't go too far!) To get better weapons, you will have to catch green and red gems. Whenever you pick a green gem, the highlighted option at the right side of the screen goes up one unit. The options are, from the bottom to the top: - More speed - More energy to your ship If you get out of energy, you lose your ship. Losing your ship means either going back to the ship you were using before you "upgraded' it, or dying if you had no previous ship! You can check your energy level in the little bar at the bottom (the bar at the right is yours; the one at the left is your enemy's, in case you're fighting a big one) - Several options for different weapons - The last option gets you a better ship If the current option is "more power to the leftside straight weapons", for example, you may select it and they will immediately take effect. If the current option is already the last, and you pick a green or red gem, you will go back to the first one (but you will get an extra side-weapon). Also, whenever you pick an option, the current option goes back to the first one. THE GEMS
During the game, you will sometimes see gems falling down when an enemy is destroyed. You may catch those gems: - Green gems As we said before, makes the current option go up one unit. - Red gems Similar to the green gem, but it increases 2 units instead of 1. - Pink gems Gives energy to your ship. If your energy is at the maximum level, this gem will give you a full blast that destroys all enemies currently on the screen. - Blue gems They multiply the score points for each destroyed enemy by 2. If you get the blue gem again, the score points are multiplied by 4; you can see the "2x" or "4x" blinking at the sidebar. - Yellow gems These give you protection balls. If you already have six protection balls and you get another yellow gem, you will get a special weapon! CHANGING SHIPS
When you get a better ship, you will be able to accumulate more energy, becoming more resistant to attacks. But whenever you "upgrade" your ship, a few things will happen: - Protection You will lose all your protection balls (let's say they're not "compatible" with your new ship). - Weapons You will lose one "degree" in your weapons (if you had used green gems to get the best possible weapon for shooting straight for- ward, for example, after upgrading your ship you will have to get one more green gem if you want your weapons at the maximum power.) - Score If your score was getting multiplied by 2 or 4, it won't be anymore (go get more blue gems!) KEYS
In the main menu, use the arrow keys and enter. To play the game, use the arrow keys to move, space for shooting and control to pick a selected option. Also: CTRL+S enable/disable the music CTRL+Q finish the play current CTRL+A about Powermanga F10 quit Powermanga P enable/disable pause F switch between full screen and windowed mode PAGE UP volume up PAGE DOWN volume down OPTIONS
Valid command line options: -h, --help prints help message and exit --version prints version information and exit --window windowed mode (full screen by default) --2x scale2x effects which scale the image of 2x --3x scale3x effects which scale the image of 3x --4x scale4x effects which scale the image of 4x --320 the game will run in a 320*200 window --full the game will run in full screen -v verbose mode --verbose verbose mode (with more messages) --nosound disable sound --sound enable sound --nosync disable timer --easy make the game easier by giving more bonuses --hard make the game harder FILES
/usr/share/games/powermanga/graphics/ Graphics files. /usr/share/games/powermanga/data/ Levels and data files. /usr/share/games/powermanga/sound/ Sound files. /usr/share/games/powermanga/texts/ Texts files. ENVIRONMENT
HOME Used to search for graphics and sounds. AUTHOR
Powermanga - Copyright TLK Games. You are free to redistribute and/or change it under the terms of the GNU General Public License. See the /usr/share/doc/powermanga/copyright for details. This manual page was written by Jeronimo Pellegrini <pellegrini@mpcnet.com.br>, based on the previous one by Sam Hocevar <sam@zoy.org>, for the Debian GNU/Linux system (but may be used by others). 2007-09-02 POWERMANGA(6)
All times are GMT -4. The time now is 11:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy