When would anyone want to use path trimming as with -p1 and so forth?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
AFAIK, Bash allows executing something and at the same time have some parts of the path removed, from left to right.
While -p0 argument will treat a path as is (which probably makes -p0 itself probably redundant):
/var/www/html/example.com
-p1 will remove the root slash, so it becomes:
var/www/html/example.com
I came to introduce this "methodology" when reading about patching modules of applications via CLUI, but I miss why would anyone want to remove a root slash from a path in shell scripting?
bash
add a comment |Â
up vote
0
down vote
favorite
AFAIK, Bash allows executing something and at the same time have some parts of the path removed, from left to right.
While -p0 argument will treat a path as is (which probably makes -p0 itself probably redundant):
/var/www/html/example.com
-p1 will remove the root slash, so it becomes:
var/www/html/example.com
I came to introduce this "methodology" when reading about patching modules of applications via CLUI, but I miss why would anyone want to remove a root slash from a path in shell scripting?
bash
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
AFAIK, Bash allows executing something and at the same time have some parts of the path removed, from left to right.
While -p0 argument will treat a path as is (which probably makes -p0 itself probably redundant):
/var/www/html/example.com
-p1 will remove the root slash, so it becomes:
var/www/html/example.com
I came to introduce this "methodology" when reading about patching modules of applications via CLUI, but I miss why would anyone want to remove a root slash from a path in shell scripting?
bash
AFAIK, Bash allows executing something and at the same time have some parts of the path removed, from left to right.
While -p0 argument will treat a path as is (which probably makes -p0 itself probably redundant):
/var/www/html/example.com
-p1 will remove the root slash, so it becomes:
var/www/html/example.com
I came to introduce this "methodology" when reading about patching modules of applications via CLUI, but I miss why would anyone want to remove a root slash from a path in shell scripting?
bash
bash
asked 1 min ago
JohnDoea
144728
144728
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478122%2fwhen-would-anyone-want-to-use-path-trimming-as-with-p1-and-so-forth%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password