stockholm/bin/slash-path-relpath
2015-05-21 01:56:08 +02:00

9 lines
152 B
Bash
Executable File

#! /bin/sh
# slash_path_relpath : lines (path ":" relpath) |> lines path
#
# Example: "/foo/bar: baz" => "/foo/baz"
#
set -euf
sed -n 's@/[^/]\+:@/@p'