Created
January 23, 2019 12:40
-
-
Save maciej/1ce1b4db5e2c4bde0ca3b26cf8c090c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
for f in (ls) | |
set -lx ff (echo -n $f | sed 's/\\\/\//g') | |
set -lx df (dirname $ff) | |
if test "$df" != "." | |
mkdir -p $df | |
mv $f $ff | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment