The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/scripts/dirnames.sh

12 lines
212 B

#!/bin/sh
# Print dirname of each relative pathname from stdin (one per line).
# pathname dirname
# ----------------------
# a/b/c.go a/b
# c.go .
exec sed \
-e 's:^:./:' \
-e 's:/[^/]*$::' \
-e 's:^\./::'