Download rename_script.bash from ASethi04/robot-trajectories-dataset: direct link, hf CLI and curl.
- Browser
- Download file 562 Bytes
-
https://huggingface.co/datasets/ASethi04/robot-trajectories-dataset/resolve/main/rename_script.bash
- Command line
-
hf download hf://datasets/ASethi04/robot-trajectories-dataset/rename_script.bash
-
curl -L -o rename_script.bash https://huggingface.co/datasets/ASethi04/robot-trajectories-dataset/resolve/main/rename_script.bash
562 Bytes
| # Find all files and directories recursively, sort them so longer paths are processed first | |
| # to avoid issues with parent directories being renamed before their contents. | |
| find . -depth -print0 | while IFS= read -r -d $'\0' file; do | |
| # Check if the filename contains a colon | |
| if [[ "$file" == *:* ]]; then | |
| # Create the new filename by replacing all colons with underscores | |
| new_file="${file//:/_}" | |
| # Rename the file/directory | |
| mv -- "$file" "$new_file" | |
| echo "Renamed: '$file' -> '$new_file'" | |
| fi | |
| done | |
| echo "Renaming complete." | |