Sponsored Content
Full Discussion: awk and sed problem
Top Forums Shell Programming and Scripting awk and sed problem Post 302452929 by Franklin52 on Monday 13th of September 2010 12:48:08 PM
Old 09-13-2010
Difficult if the header has more names with spaces.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed/awk String problem

I would appreciate it if any one can guide me in using awk perhaps sed in extracting some values from a long string. here is an example. .......some lines here........ ........ aaaa bbbb cccc ddddd eeeee fffff gggg (time:hhhh)........ ......some lines here also.......... How can I extract... (2 Replies)
Discussion started by: odogbolu98
2 Replies

2. Shell Programming and Scripting

awk & sed problem

Hello, I am new to shell scripting. I want to optimize my one of the script. I have one file and i want to remove selected zones for domains from that file.In this file i have almost 3500 zones for domains.Sample data for the file.... named.backup... (0 Replies)
Discussion started by: nrbhole
0 Replies

3. Shell Programming and Scripting

awk,sed or cut problem

Good afternoon, Sir's, I would like to seek your assistance regarding on this matter. $cat file1 111 aaaa bbb aass aaa files file1 temp temp1 pix 222 11 22 1 33 44 desired output: aaaa bbb aass files file1 temp1 222 11 22 1 33 44 thanks (7 Replies)
Discussion started by: invinzin21
7 Replies

4. Shell Programming and Scripting

awk...sed problem

Hi guys, I am tryingto delete or ignore columns in a large dataset using 'sed'. For example, I have the following dataset: - 20060714,X.XX,1,043004,Q,T,24.0000,1,25.5000,4, 20060714,X.XX,1,081209,Q,T,24.0000,1,25.5000,5, As you can see, there are 10 columns here and the table that I am... (1 Reply)
Discussion started by: aarif
1 Replies

5. Shell Programming and Scripting

Problem facing with sed and awk

Hi All, I have a got a problem .. I have t files as below: 1.txt contains ----- ----- ----- column 1, "cat", column 24, "dog", column 100, "rat", ----- ----- ----- 2.sh should contain ----- ----- ----- awk 'BEGIN { printf ("%1s","cat")}' (19 Replies)
Discussion started by: jisha
19 Replies

6. Shell Programming and Scripting

Another parsing line awk or sed problem

Hi, After looking on different forums, I'm still in trouble to parse a parameters line received in KSH. $* is equal to "/AAA:111 /BBB:222 /CCC:333 /DDD:444" I would like to parse it and be able to access anyone from his name in my KSH after. like echo myArray => display 111 ... (1 Reply)
Discussion started by: RickTrader
1 Replies

7. Shell Programming and Scripting

awk/sed problem

I have a bunch of files I need to change a letter to another letter only in the first column of a space delimited file. The problem is that after the first column, there's comments and such that cause problems with awk. Here's what my data looks like: 16a28.0a27.0a26.0a25.0a24.67.255.200... (3 Replies)
Discussion started by: supradave
3 Replies

8. Shell Programming and Scripting

Some problem with awk or sed in if conditions

#set -x path=`pwd` while read line do dd=`echo $line|awk -F"," '{print $1}'|awk -F"/" '{print $2}'` if then mm=`echo $line|awk -F"," '{print $1}'|awk -F"/" '{print $1}'` yy=`echo $line|awk -F"," '{print $1}'|awk -F"/" '{print $3}'` var=`echo $line|awk -F"," '{print $2}'` var1=`echo... (2 Replies)
Discussion started by: nikhil jain
2 Replies

9. Shell Programming and Scripting

Problem with output awk and sed

I have file, i am extracting email address from file. but problem is that output is very ugly. I am using this command REMOVED "CSS OFFENDING CODE"... While original filename have no such character. Please suggest. (20 Replies)
Discussion started by: learnbash
20 Replies

10. Shell Programming and Scripting

sed or awk script problem

Hi All I am having a file as shown below File1# modyle 1 { test jsj hhsjh 13e3 jsjjs } memP(dbg_trace) { ajjs jsjs jsjs Test(claer) { jsjs (7 Replies)
Discussion started by: kshitij
7 Replies
XBomb(6)							   Games Manual 							  XBomb(6)

NAME
xbomb - a version of the popular minesweeper program with some novel features. SYNOPSIS
xbomb [-hexagon|-square|-triangle] [-1|-2|-3] [-hiscore] OPTIONS
-hiscore command line option displays the current hi-score table without starting the game. -hexagon | -square | -triangle Selects the type of grid to use when starting the game. -1 | -2 | -3 Selects the level to use when starting the game. The standard X window options also apply to this program. DESCRIPTION
A game of logical deduction against the clock. The purpose of the game is to find the location of the hidden bombs in a grid. Each of the locations in the grid is initially covered, by uncovering a locations, a number or a bomb will be revealed underneath. If a bomb is revealed then the game is finished. A number indicates the number of adjacent locations that contain bombs. Locations that have not been uncovered but are thought to contain bombs can be marked as such so that they can be identified. There is a choice of hexagonal, square or triangular units that make up the grid, the level of difficulty increasing as the number of sides decreases. In all cases the grids are of the same size and contain the same number of bombs for the same levels. There are three levels to the game: Easy 8 by 8 grid with 10 bombs. Medium 16 by 16 grid with 40 bombs. Difficult 30 by 16 grid with 99 bombs. A high score table is maintained for each of the levels for each of the grid types, storing the username, the time to complete the puzzle and the date that it was finished. MOUSE OPERATION
The game is played with the mouse, with all three buttons having different actions. Left Button Uncover the current location if it is hidden or uncover all surrounding locations marked as not containing bombs if the square is already uncovered. The first selection made in a game is always a 'safe' square. Middle Button Uncover all surrounding locations that are not marked as containing a bomb. Right Button Mark the current grid location as having a hidden bomb (toggle). KEYSTROKES
There are a number of keystroke shortcuts for the game: 1 2 3 Select level 1, 2 or 3 for the next game. s Start a new game. q Quit the program. h Print the high-scores. H or Control-H Use the grid of hexagons for the next game. S or Control-S Use the grid of squares for the next game. T or Control-T Use the grid of triangles for the next game. X RESOURCES The name of the class used is XBomb, the widget hierarchy used is (Widget-Class:name): XBomb Form:form Command:start MenuButton:menu SimpleMenu:levelmenushell smeBSBObject:Easy smeBSBObject:Medium smeBSBObject:Difficult MenuButton:menu SimpleMenu:typemenushell smeBSBObject:Hexagon smeBSBObject:Square smeBSBObject:Triangle Command:hiscore Command:quit Core:grid Command:clock Command:uxb The extra resources that are available for the grid are: grid.bomb The colour of the bombs - default black. grid.bombreal The colour of the real bombs - default red. grid.bombmark The colour of the bombs that are marked by the user - default orange. grid.number The colour of the number '1' when drawn in the grid - default navy blue. grid.number2 The colour of the number '2' when drawn in the grid - default dark green. grid.number3 The colour of the number '3' when drawn in the grid - default dark red. The other numbers up to 12 also have their own resources. grid.hidden The colour of the hidden squares - default grey50. grid.correct The colour of the squares that were correctly guessed - default green grid.font The font that is used for the number in the grid - default lucidasans-24 BUGS
None known. AUTHOR
Andrew M. Bishop. January 5, 2008 XBomb(6)
All times are GMT -4. The time now is 11:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy