Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| def remove_duplicates(x, seperator="§"): | |
| if len(x) < 2: | |
| return x | |
| fin = "" | |
| for j in x: | |
| if fin == "": | |
| fin = j | |
| else: | |
| if j == fin[-1] and fin[-1] is not seperator: | |
| continue |
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 bash | |
| : ${1:?Please supply a file} # ${1} is the zip being fed to the script -- a little user-friendliness never went amiss | |
| DIR="${1%.zip}" # this is where the current zip will be unzipped | |
| mkdir -p "${DIR}" || exit 1 # might fail if it's a file already | |
| unzip -n -d "${DIR}" "${1}" # unzip current zip to target directory | |
| find "${DIR}" -type f -name '*.zip' -print0 | xargs -0 -n1 "${0}" # scan the target directory for more zips and recursively call this script (via ${0}) | |
| # 1. Make it executable | |
| # chmod +x my_unzip.sh |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.