From 60e526dc9419d0bff89b05f4a98332aae48a0253 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 21 May 2015 01:56:08 +0200 Subject: sh: functions -> bin/ --- bin/slash-path-relpath | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 bin/slash-path-relpath (limited to 'bin/slash-path-relpath') diff --git a/bin/slash-path-relpath b/bin/slash-path-relpath new file mode 100755 index 0000000..40230a7 --- /dev/null +++ b/bin/slash-path-relpath @@ -0,0 +1,8 @@ +#! /bin/sh +# slash_path_relpath : lines (path ":" relpath) |> lines path +# +# Example: "/foo/bar: baz" => "/foo/baz" +# +set -euf + +sed -n 's@/[^/]\+:@/@p' -- cgit v1.2.3