mirror of
https://github.com/heyarne/earth-observation-for-journalism.git
synced 2026-05-07 03:23:40 +02:00
Rename files to avoid spaces
This commit is contained in:
parent
b20ce993f4
commit
e974a9a1fa
18 changed files with 36 additions and 24 deletions
12
rename.sh
Executable file
12
rename.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
OIFS="$IFS"
|
||||
IFS=$'\n'
|
||||
for file in `find sources -maxdepth 1 -type f -name "*.ipynb"`
|
||||
do
|
||||
name="$(basename $file)"
|
||||
renamed="$(basename $file | sed 's/.*/\L&/' | sed 's/ /-/g')"
|
||||
sed -i "s/$name/$renamed/g" sources/*.ipynb _toc.yml
|
||||
git mv $file "sources/$renamed"
|
||||
done
|
||||
IFS="$OIFS"
|
||||
Loading…
Add table
Add a link
Reference in a new issue