Sponsored Content
Top Forums Shell Programming and Scripting Convert creates multiple files Post 303027157 by Kangol on Monday 10th of December 2018 09:03:09 AM
Old 12-10-2018
I have an image with a big canvas, and the image falls within it. I am trying to crop to the size of the actual image.
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

gVim creates and leaves strange tilde ~ files in Windows

Hey folks, I have used gVim in Windows for many years but I have never found an answer to a very simple question I am going to ask you guys... My question is if there is a way to eliminate the creation of those ~ files that gVim creates in Windows. If you have ever used gVim in Windows you... (2 Replies)
Discussion started by: ghbarratt
2 Replies

2. UNIX for Dummies Questions & Answers

SCO 5.0.7 Cron creates files with 600, need 644

Hi, I've searched and read, and searched and read some more; but I'm still not connecting the dots or understanding what I need to change. I have a script that creates a file. If I run it as root, the file gets created with 644 permissions like I want. That seems to make sense (at least I... (2 Replies)
Discussion started by: 65bit
2 Replies

3. UNIX for Dummies Questions & Answers

naming files that csplit creates

Hi, This is my first time on this forum.. I searched the previous answers, but didn't find the answer I was looking for at first glance. csplit works beautifully for me, except for one thing. My file looks like this: ad|name1|asdf...(several pages)..asdf ... ad|name2|asdf...(several... (8 Replies)
Discussion started by: juliette salexa
8 Replies

4. Shell Programming and Scripting

Cannot get to convert multiple spaces to one space

Hi Guys, I am using a Redhat Linux Centos machine and trying to convert multiple spaces in a file to one space. I am using: sed '/./,/^$/!d' input_file > output_file I also tried cat -s Both gave me no change in the output file. I tried this on cygwin and it worked... (7 Replies)
Discussion started by: npatwardhan
7 Replies

5. UNIX for Dummies Questions & Answers

Using AWK: Extract data from multiple files and output to multiple new files

Hi, I'd like to process multiple files. For example: file1.txt file2.txt file3.txt Each file contains several lines of data. I want to extract a piece of data and output it to a new file. file1.txt ----> newfile1.txt file2.txt ----> newfile2.txt file3.txt ----> newfile3.txt Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies

6. Shell Programming and Scripting

awk, multiple files input and multiple files output

Hi! I'm new in awk and I need some help. I have a folder with a lot of files and I need that awk do something in each file and print a new file with the output. The input file name should be modified when I print the outpu files. Thanks in advance for help! :-) ciao (5 Replies)
Discussion started by: gabrysfe
5 Replies

7. Shell Programming and Scripting

How to convert multiple number ranges into sequence?

Looking for a simple way to convert ranges to a numerical sequence that would assign the original value of the range to the individual numbers that are on the range. Thank you given data 13196-13199 0 13200 4 13201 10 13202-13207 3 13208-13210 7 desired... (3 Replies)
Discussion started by: jcue25
3 Replies

8. UNIX for Advanced & Expert Users

Allow user without dir write permission to execute a script that creates files

In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Discussion started by: waavman
14 Replies

9. Shell Programming and Scripting

Convert single column into multiple rows

Convert Single column to multiple rows file a.txt contains data like below Server=abc Run=1 Tables=10 Sessions=16 Time=380 Jobs=5 Server=abc Run=2 Tables=15 Sessions=16 Time=400 Jobs=5 Server=abc Run=3 Tables=20 Sessions=16 Time=450 (5 Replies)
Discussion started by: sol_nov
5 Replies

10. Shell Programming and Scripting

Grep strings on multiple files and output to multiple files

Hi All, I want to use egrep on multiple files and the results should be output to multiple files. I am using the below code in my shell script(working in Ksh shell). However with this code I am not attaining the desired results. #!/bin/ksh ( a="/path/file1" b="path/file2" for file in... (4 Replies)
Discussion started by: am24
4 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 09:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy