06-27-2019
I found my answer
here, using:
-s '%^/%<relative_path>/%' works, for anyone else that may run into this.
This User Gave Thanks to c3rb3rus For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to perform a task on all the files in the current directory but I'd like to loop through them one at a time. How do I tell it to give me the first filename? (2 Replies)
Discussion started by: calgone337
2 Replies
2. Shell Programming and Scripting
Hi All
I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age.
I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies
3. AIX
Dear All:
we are using backup command on AIX to take backup
as below in this command we also add compress command
ulimit unlimited
cd /apps/oracle
find orcldb orcldata arch |tee /apps/orabkp/ofgl.faysalbank.com-17Jun10Thu-ORCL-DB.bkp.gz.log | backup -ivqf - |gzip -c >... (0 Replies)
Discussion started by: lodhi1978
0 Replies
4. UNIX for Dummies Questions & Answers
Hello Every one,
I want to back up all passwd files to /xyz/passfiles.cpio
and Then restore them to /abc directory.
Here is what I wrote:
find / -name passwd | cpio -oc > /tmp/passwd.cpio
and to restore
cd abc
cpio -ium < /tmp/passwd.cpio
I can not find the files restored to /abc... (2 Replies)
Discussion started by: drdigital_m
2 Replies
5. Shell Programming and Scripting
I wanna make a backup tarball. I wanna write a script that makes tarball of the current directory.
There are lots of files so I cant type all files, I wanna make the tarball by excluding few files.
Like there 1000 files in a directory I wanna create a tarball containing 98 files of that... (1 Reply)
Discussion started by: nishrestha
1 Replies
6. UNIX for Advanced & Expert Users
Hello,
I want to use the string with the current directory in my awk command.
I tried: 'pwd=system("pwd")'
but it doesn't work. can please help somebody? (2 Replies)
Discussion started by: daWonderer
2 Replies
7. AIX
I am trying to restore a specific directory and all sub-directories therein using a rootvg tape. I am using the following command to make the backup:
mksysb -m -i -v /dev/rmt0
However, I am getting the following result:
tctl status
rmt0 Available 04-08-00-0,0 LVD SCSI 4mm Tape Drive... (10 Replies)
Discussion started by: herot
10 Replies
8. UNIX for Dummies Questions & Answers
Hi, I'm very new to Unix, but have been given a command to type in which is :
mail -s <email subject goes here> <my email address> <success.txt
this command is quite a basic one and sends an email containing the contents of the file "success.txt" to whatever email I put in with the subject of... (2 Replies)
Discussion started by: rnmuk
2 Replies
9. UNIX for Dummies Questions & Answers
How to get the current directory Path in your prompt?
i am getting a $ mark only in my prompt?
Please help me with this (3 Replies)
Discussion started by: Abhishek0683
3 Replies
10. AIX
Hi,
I have taken a backup of a directory on my tape in using below command
cd /backup
find * -print|backup -ivf '/dev/rmt0' '-U' |tee -a /syslogs/backup.log and output appear in below format.
a 0 rman-before-08032014
a 58403323904... (2 Replies)
Discussion started by: m_raheelahmed
2 Replies
LEARN ABOUT DEBIAN
plack::app::urlmap
Plack::App::URLMap(3pm) User Contributed Perl Documentation Plack::App::URLMap(3pm)
NAME
Plack::App::URLMap - Map multiple apps in different paths
SYNOPSIS
use Plack::App::URLMap;
my $app1 = sub { ... };
my $app2 = sub { ... };
my $app3 = sub { ... };
my $urlmap = Plack::App::URLMap->new;
$urlmap->map("/" => $app1);
$urlmap->map("/foo" => $app2);
$urlmap->map("http://bar.example.com/" => $app3);
my $app = $urlmap->to_app;
DESCRIPTION
Plack::App::URLMap is a PSGI application that can dispatch multiple applications based on URL path and hostnames (a.k.a "virtual hosting")
and takes care of rewriting "SCRIPT_NAME" and "PATH_INFO" (See "HOW THIS WORKS" for details). This module is inspired by Rack::URLMap.
METHODS
map
$urlmap->map("/foo" => $app);
$urlmap->map("http://bar.example.com/" => $another_app);
Maps URL path or an absolute URL to a PSGI application. The match order is sorted by host name length and then path length.
URL paths need to match from the beginning and should match completely till the path separator (or the end of the path). For example,
if you register the path "/foo", it will match with the request "/foo", "/foo/" or "/foo/bar" but it won't match with "/foox".
Mapping URL with host names is also possible, and in that case the URL mapping works like a virtual host.
Mappings will nest. If $app is already mapped to "/baz" it will match a request for "/foo/baz" but not "/foo". See "HOW THIS WORKS"
for more details.
mount
Alias for "map".
to_app
my $handler = $urlmap->to_app;
Returns the PSGI application code reference. Note that the Plack::App::URLMap object is callable (by overloading the code dereference),
so returning the object itself as a PSGI application should also work.
DEBUGGING
You can set the environment variable "PLACK_URLMAP_DEBUG" to see how this application matches with the incoming request host names and
paths.
HOW THIS WORKS
This application works by fixing "SCRIPT_NAME" and "PATH_INFO" before dispatching the incoming request to the relocated applications.
Say you have a Wiki application that takes "/index" and "/page/*" and makes a PSGI application $wiki_app out of it, using one of supported
web frameworks, you can put the whole application under "/wiki" by:
# MyWikiApp looks at PATH_INFO and handles /index and /page/*
my $wiki_app = sub { MyWikiApp->run(@_) };
use Plack::App::URLMap;
my $app = Plack::App::URLMap->new;
$app->mount("/wiki" => $wiki_app);
When a request comes in with "PATH_INFO" set to "/wiki/page/foo", the URLMap application $app strips the "/wiki" part from "PATH_INFO" and
appends that to "SCRIPT_NAME".
That way, if the $app is mounted under the root (i.e. "SCRIPT_NAME" is "") with standalone web servers like Starman, "SCRIPT_NAME" is now
locally set to "/wiki" and "PATH_INFO" is changed to "/page/foo" when $wiki_app gets called.
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
Plack::Builder
perl v5.14.2 2011-06-22 Plack::App::URLMap(3pm)