stockholm/bin/slash-path-relpath

9 lines
152 B
Plaintext
Raw Normal View History

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