10-09-2019
Any attempt / idea / thought from your side?
I can't see your logics example comply to your specification - none of those $2 values represent the "same path upto 5 dir levels". The first entry has four levels only, the next two have five but are different. Please revise your spec / example.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
Hope all the expert can help me in this situation.
Let say I have one file with multiple record like below:
NAME=FRAGMENT
LANGUAGE=1
DIALECT=0
GENDER=NONE
FILE=TEST1
DIRECTORY=D:/DETAILS/1/0/test1.txt
END
NAME=FRAGMENT
LANGUAGE=1
DIALECT=0
GENDER=NONE (13 Replies)
Discussion started by: shirleyeow
13 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a directory file name:
/auto/space/user/jen/CED/CED_01MZ/visit1/DCE_2eco/016/echo1
I would like to just get the following outputs into variables such that:
variable1 = /auto/space/user/jen/CED/CED_01MZ/visit1/
and
variable2 = DCE_2eco/016/echo1
I've tried it with... (2 Replies)
Discussion started by: nixjennings
2 Replies
3. Shell Programming and Scripting
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies
4. Shell Programming and Scripting
Hi,
I have following path:
set file_path = D:/forums/prac/somedir/new1/file1.txt
or set file_path = E:/new/forums1/prac/somedir/new2/file2.txt
I need to grep "somedir" from file path. In this case preceding directory "prac" remains same for both the paths, but directories preceding... (7 Replies)
Discussion started by: sarbjit
7 Replies
5. Shell Programming and Scripting
Hello,
I searched the forums and didn't see a situation like this:
I cannot figure out how to parse out just the file name from the full path. The path looks like this:
\\foo\bar\filename.ext
I don't think something like 'cut' will work so I tried to whip up a regex but couldn't get it... (12 Replies)
Discussion started by: bytesnoop
12 Replies
6. Shell Programming and Scripting
I am looking to parse a text file output and set variables based on what is cropped from the parsing.
Below is my script I am looking to add this feature too.
All it does is scan a certain area of users directories for anyone using up more than X amount of disk space. It then writes to the... (4 Replies)
Discussion started by: es760
4 Replies
7. Shell Programming and Scripting
Hi All,
i had to split one files into 10 equally. For that i have coded below awk.
OUTPUT_FILE=/home/sit/path/Files/file_EXPORT.lst
DIR_NM=`dirname ${OUTPUT_FILE}`
awk -v CURR_DATE="$(date +'%d-%m-%Y-%H-%M')" -v pth=$DIR_NM '{print >> pth/"tgt_file_name"CURR_DATE"_"NR%10 }' ${OUTPUT_FILE}
... (7 Replies)
Discussion started by: looney
7 Replies
8. UNIX for Beginners Questions & Answers
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
9. UNIX for Beginners Questions & Answers
What is the difference ../directory path and ./directory path in ksh? (1 Reply)
Discussion started by: TestKing
1 Replies
LEARN ABOUT MOJAVE
map_slippy_fetcher
map::slippy::fetcher(n) Mapping utilities map::slippy::fetcher(n)
__________________________________________________________________________________________________________________________________________________
NAME
map::slippy::fetcher - Accessing a server providing tiles for slippy-based maps
SYNOPSIS
package require Tcl 8.4
package require Tk 8.4
package require img::png
package require map::slippy
package require map::slippy::fetcher ?0.2?
::map::slippy::fetcher fetcherName levels url
fetcherName levels
fetcherName tileheight
fetcherName tilewidth
fetcherName get tile donecmd
_________________________________________________________________
DESCRIPTION
This package provides a class for accessing http servers providing tiles for slippy-based maps.
API
::map::slippy::fetcher fetcherName levels url
Creates the fetcher fetcherName and configures it with the number of zoom levels supported by the tile server, and the url it is
listening on for tile requests.
The result of the command is fetcherName.
METHODS
fetcherName levels
This method returns the number of zoom levels supported by the fetcher object, and the tile server it is accessing.
fetcherName tileheight
This method returns the height of tiles served, in pixels.
fetcherName tilewidth
This method returns the width of tiles served, in pixels.
fetcherName get tile donecmd
This is the main method of the fetcher, retrieving the image for the specified tile. The tile identifier is a list containing three
elements, the zoom level, row, and column number of the tile, in this order.
The command refix donecmd will be invoked when the fetcher 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.
REFERENCES
[1] http://wiki.openstreetmap.org/wiki/Main_Page
KEYWORDS
http, location, map, server, slippy, tile, url, zoom
map 0.2 map::slippy::fetcher(n)