CLI to avoid over-writing file-sytem names which already exist.
It is insensitive to argument type (file/directory).
go install github.com/kendfss/namespacer
Or
git clone github.com/kendfss/namespacer
cd namespacer
go install
Or
git clone github.com/kendfss/namespacer
cd namespacer
make install
It accepts three arguments:
path
: to the file/directoryformat
: string that specifies the pattern that spaced names should extend withindex
: the first number to try if the path argument already exists
namespacer main.go
# returns "main_2.go" if main.go already exists
namespacer -path main.go -format " (%v)" -index 3
# "main (3).go"
namespacer main.go " v%d" 40
# main v40.go
namespacer main.go " v%x" 40
# main v28.go
namespacer main.go " v%b" 40
# main v101000.go