I got a game that output map tiles of the session with the 0,0 position at the place you login/spawn.
That makes making a map somewhat troublesome since the 0,0 will move.
So I've been looking for a way to change the numbers in the filenames of all files in a folder by a certain value.
The tiles are named "tile_X_Y.png".
I tried to use awk to get the X and Y numbers out, add the values to them and then rename the file, but are not quite sure how to manage that.
I'm not really sure how to use one awk's output as another awk's input
I have edited the code since posted.
It feels like there must be a way that's more effective than this script, and I don't really know how to get this script to work.
Thanks in advance.
Last edited by Ravenholdt; 05-17-2012 at 07:46 PM..
ok, this one is definitely too hard for my shell-script-skills.
Hopefully, there is somebody who can help me with this:
I have a folder with files in it named
0.ppm
10.ppm
2.ppm
...
5.ppm
50.ppm
55.ppm
...
355.ppm
360.ppm
etc.
As you will notice, the order in which the files are... (5 Replies)
Hi All,
I need to increase the filesystem of / and /var (two different slices)? Space will be coming from /home slice so I need to decrease it. Is that possible without reinstallation or in a single-user-mode?
Any idea or link please.
Thanks in advance. (5 Replies)
i have several thousand files and in subdirs that are named
file.46634.txt
budget.75346.pdf
etc
i want to remove the number but retain the extension.
it is always a 5 digit.
thanks. (6 Replies)
I have some files where numbers are part of like
eg 1add1.txt
23sub41.txt etc
I want to remove numbers from the filenames(whereever it may be).
I used echo `ls *.txt | sed -e "s///"`
But its removing first digits like 1add1.txt becomes add1.txt
My intention is to make 1add1.txt... (3 Replies)
Hi guys,
need your help on this since i dont know much about solaris.
the problem is i need to increase inodes space on /export/home/
root@BRF-DANCCM1 # /usr/ucb/df -i
Filesystem iused ifree %iused Mounted on
/dev/vx/dsk/bootdg/rootvol
53026 1162206 ... (7 Replies)
Hi all,
Can I edit this script:
find . -type f | while read i;do && mv "$i" "${i//abc/}" ;done
so that it will not only take out abc from the filename but also take out any numbers that might be in the filename as well.
An example would be,
Input:
filename abc 2009.mov
Output:... (7 Replies)
Hi Gurus
I want to know the command & tips regarding, how to increase or decrease inode number of the particular ufs filesystem. Is it possible to do it in a live/production environment.
Regards (3 Replies)
I m tring to figure out the option where i can increase/Decrease the count for local virtual consoles(vtys).
I can able to take upto 6 vtys using (left alt+(F1-F6))
But is there any way i can increase the count ?
One more query
even though i can only take tty upto tty6 why there are tty... (2 Replies)
Hi
I have a file with filename as "partition-setup-and-ipl.vtcmd.76217657132.9721536798"
Now i need to move this file as "partition-setup-and-ipl.vtcmd.76217657132.9721536798_org"
i tried with
# ls | grep -E "partition-setup-and-ipl.vtcmd.+"... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
LEARN ABOUT OSX
map_slippy_cache
map::slippy::cache(n) Mapping utilities map::slippy::cache(n)
__________________________________________________________________________________________________________________________________________________NAME
map::slippy::cache - Management of a tile cache in the local filesystem
SYNOPSIS
package require Tcl 8.4
package require Tk 8.4
package require img::png
package require map::slippy
package require map::slippy::cache ?0.2?
::map::slippy::cache cacheName cachedir provider
cacheName valid tile ?msgvar?
cacheName exists tile
cacheName get tile donecmd
_________________________________________________________________DESCRIPTION
This package provides a class for managing a cache of tiles for slippy-based maps in the local filesystem.
API
::map::slippy::cache cacheName cachedir provider
Creates the cache cacheName and configures it with both the path to the directory contaiing the locally cached tiles (cachedir), and
the command prefix from which it will pull tiles asked for and not yet known to the cache itself (provider).
The result of the command is cacheName.
METHODS
cacheName valid tile ?msgvar?
This method checks the validity of a the given tile identifier. This is a convenience wrapper to ::map::slippy tile valid and has
the same interface.
cacheName exists tile
This methods tests whether the cache contains the specified tile or not. The result is a boolean value, true if the tile is known,
and false otherwise. The tile is identified by a list containing three elements, zoom level, row, and column number, in this order.
cacheName get tile donecmd
This is the main method of the cache, retrieving the image for the specified tile from the cache. The tile identifier is a list con-
taining three elements, the zoom level, row, and column number of the tile, in this order.
The command refix donecmd will be invoked when the cache either knows the image for the tile or that no image will forthcoming. It
will be invoked with either 2 or 3 arguments, i.e.
[1] The string set, the tile, and the image.
[2] The string unset, and the tile.
These two possibilities are used to either signal the image for the tile, or that the tile has no image defined for it.
When the cache has no information about the tile it will invoke the provider command prefix specified during its construction, adding three
arguments: The string get, the tile, and a callback into the cache. The latter will be invoked by the provider to either transfer the image
to the cache, or signal that the tile has no image.
When multiple requests for the same tile are made only one request will be issued to the provider.
REFERENCES
[1] http://wiki.openstreetmap.org/wiki/Main_Page
KEYWORDS
cache, filesystem, location, map, slippy, tile, zoom
map 0.2 map::slippy::cache(n)