Skip to content

Instantly share code, notes, and snippets.

@maciej
Created January 23, 2019 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maciej/1ce1b4db5e2c4bde0ca3b26cf8c090c8 to your computer and use it in GitHub Desktop.
Save maciej/1ce1b4db5e2c4bde0ca3b26cf8c090c8 to your computer and use it in GitHub Desktop.
#!/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