Sponsored Content
Top Forums Shell Programming and Scripting Finding a format in a file and replacing it Post 302623499 by Corona688 on Friday 13th of April 2012 06:26:21 PM
Old 04-13-2012
Is it always in the same column? That would make it a lot easier.

IOW, show a sample of your input data, not just a single cell of it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

shellscript for finding and replacing in DG-UNIX

Newby here..... Is there any way of doing a find & replace within a huge file other than using something like : " vi - FileForReplacing < /u1/excel/consultants " contents of consultants file looks like :1,$s/0000031/CON/g :1,$s/0001032/JONES/g :1,$s/0001355/SMITH/g... (3 Replies)
Discussion started by: Gerry405
3 Replies

2. Solaris

finding & replacing blank rows/spaces in a file

Can anyone help me find and replace blank rows in a file with a numeric value (ie blankrow=someTxtOrNumValue), the file is over 500,000 rows long so it would need to be the quickest way as I'll need to do this for multiple files...I would be greatfull for any suggestions....thanks sample file:... (2 Replies)
Discussion started by: Gerry405
2 Replies

3. Shell Programming and Scripting

help with finding & replacing pattern in a file

Hi everyone. Could u be so kind and help me with on "simple" shell script? 1. i need to search a file line by line for a pattern. example of a lines in that file 2947 domain = feD,id = 00 0A 02 48 17 1E 1D 39 DE 00 0E 00,Name Values:snNo = f10 Add AttFlag = 0 2. i need to find... (0 Replies)
Discussion started by: dusoo
0 Replies

4. Shell Programming and Scripting

Need help in finding and replacing port numbers.

Hi All, I am trying to write a shell script which firstly will search some files and then increase the port numbers mentioned in them by a certain no. let me clear it with an example- suppose there r few files a,b,c,d.... file a's content- <serverEntries xmi:id="ServerEntry_1"... (3 Replies)
Discussion started by: ankushsingh10
3 Replies

5. Shell Programming and Scripting

Finding and replacing links

Hi, I would like to do a scripting for finding the links based on the name I have and replace the links with the new name. General find command lists everything for that links ( means all the sub-sirs and all the files), i need only the main link and replace. Can you anyone give me some... (1 Reply)
Discussion started by: rrb2009
1 Replies

6. Shell Programming and Scripting

Finding a String and Replacing it with an incremental value

Hi Friends, I have a text file which has about 200,000 records in it. we have a string which repeats in each and every record. So we have to write a script in ksh which finds that string on each line and replaces it with a new string(incremental value) for a set every four records. To be... (12 Replies)
Discussion started by: vpv0002
12 Replies

7. Homework & Coursework Questions

Finding/replacing text and redirection help

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: What command would rename "sequentialInsert", in ~cs252/Assignments/commandsAsst/project/arrayops.h, to... (2 Replies)
Discussion started by: lothwen
2 Replies

8. Shell Programming and Scripting

Finding and replacing whole line using sed

Hi all, assume that i am having the following line in a file called file1. triumph and disaster must be treated same. I want to replace this line with. follow excellence success will chase you. is it possible to do this using sed. if possible kindly post me the... (2 Replies)
Discussion started by: anishkumarv
2 Replies

9. Shell Programming and Scripting

Finding/replacing strings in some files based on a file

Hi, We have a file (e.g. a .csv file, but could be any other format), with 2 columns: the old value and the new value. We need to modify all the files within the current directory (including subdirectories), so find and replace the contents found in the first column within the file, with the... (9 Replies)
Discussion started by: Talkabout
9 Replies

10. Shell Programming and Scripting

Finding the pattern and replacing the pattern inside the file

i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of value abc and ccc in the place of them. Input File: go to &abc=ddd; if... (16 Replies)
Discussion started by: saaisiva
16 Replies
canvas::sqmap(n)					      Variations on a canvas						  canvas::sqmap(n)

__________________________________________________________________________________________________________________________________________________

NAME
canvas::sqmap - Canvas with map background based on square tiles SYNOPSIS
package require Tcl 8.4 package require Tk 8.4 package require snit package require uevent::onidle package require cache::async package require canvas::sqmap ?0.3.1? ::canvas::sqmap pathName ?options? canvasName image set cell image canvasName image unset cell canvasName flush _________________________________________________________________ DESCRIPTION
This package provides an extended canvas widget for the display of maps based on a set of square image tiles. The tiles are the background of the canvas, with all other canvas items added always shown in front of them. The number of tiles shown, tile size, and where to get the images to show are all configurable. API
::canvas::sqmap pathName ?options? Creates the canvas pathName and configures it. The new widget supports all of the options and methods of a regular canvas, plus the options and methods described below. The result of the command is pathName. OPTIONS -grid-cell-width The value for this option is a non-negative integer. It specifies the width of the cells the background is made up of. -grid-cell-height The value for this option is a non-negative integer. It specifies the height of the cells the background is made up of. -grid-cell-command The value for this option is a command prefix. It is invoked whenever the canvas needs the image for a specific cell of the back- ground, with two additional arguments, the id of the cell, and a command prefix to invoke when the image is ready, or known to not exist. The id of the cell is a 2-element list containing the row and column number of the cell, in this order. The result command prefix (named "$result" in the example below) has to be invoked with either two or three arguments, i.e. $result set $cellid $image ; # image is known and ready $result unset $cellid ; # image does not exist This option may be left undefined, i.e. the canvas can operate without it. In that case the only images shown in grid cells are those explicitly set with the method image set, see the next section. All other grid cells will simply be empty. -viewport-command This option specifies a command prefix to invoke when the viewport of the canvas is changed, to allow users keep track of where in the scroll-region we are at all times. This can be used, for example, to drive derivate displays, or to keep items in view by moving them as the viewport moves. -image-on-load The value for this option is an image. If specified the image is shown in a cell while the actual image for that cell is getting loaded through the callback specified by the -grid-cell-command. -image-on-unset The value for this option is an image. If specified the image is shown in a cell for which the callback specified by the -grid-cell- command reported that there is no actual image to be shown. METHODS canvasName image set cell image Invoking this method places the image into the specified cell of the background. The cell is given as a 2-element list containing row and column number, in this order. Note that an image is allowed to be associated with and displayed in multiple cells of the canvas. canvasName image unset cell Invoking this method declares the specified cell of the background as empty, an existing image shown by this cell will be forgotten. The cell is given as a 2-element list containing row and column number, in this order. canvasName flush Invoking this method forces the canvas to completely reload the images for all cells. Do not use this method if the canvas is oper- ated without a -grid-cell-command, as in that case the canvas will simply forget all images without being able to reload them. IMAGE OWNERSHIP
Note that the canvas does not take ownership of the images it shows in the background. In other words, when we say that the canvas forgets an image this means only that the association between a grid cell and shown image is broken. The image is not deleted. Managing the lifecy- cle of the images shown by the canvas is responsibility of the user of the canvas. KEYWORDS
canvas, cell, grid, image, map, square map, tile canvas 0.3.1 canvas::sqmap(n)
All times are GMT -4. The time now is 06:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy