delete_duplicate_files.sh - deletes duplicate files with (N) suffixes, commonly caused by web browser downloads, in the given or current directory. Checks they're exact duplicates of a matching basename file without the (N) suffix with the exact same checksum for safety. Prompts to delete ...
function myDir($dir = __file__) { // 定于需要列出的目录地址 //$dir = dirname(_...
then # update the working file to newest version cp "$TAMPDIR/setupTermuxArch" "${0##*/}" rm -rf "$TAMPDIR" cd "$WDIR" # change directory back to working directory [[ -z "${ARGS:-}" ]] && printf "\\e[1;32mFile \\e[0;32m'%s'\\e[1;32m UPDATED\\e[1;34m:\\...
find_lock.sh - tries to find if a lockfile is used in the given or current working directory by taking snapshots of the file list before and after a prompt in which you should open/close an application foreach_path_bin.sh - runs each binary of the given name found in $PATH with the...
# Simple file management task using Bashmkdirnew_directoryls# Output:# new_directory Bash Copy In this example, we create a new directory using themkdircommand and then list the contents of the current directory withls. The output shows the newly created directory, demonstrating how Bash commands...
Images must be stored in the images directory. To build your blog, run pbb build. This extracts all the titles into an index file; the index file links to all files following the naming convention above and lists them in reverse alphabetical order, with the newest post at the top. The ...
For that we paste it into a file scrape_actors.sh, set the executable flag, and make sure our Xidel binary is in the same directory. Now we should be able to run our scraper with ./scrape_actors.sh and after a few seconds we should have got a new file actors.csv with all the ...
Of course I know that I can get text by using: func textViewDidEndEditing(_ textView: UITextView) but I need to observe all changes in real time as user types. The other option I always see is to use: func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, ...
/bin/bash# Unit-tests for library script in the current directory# Also verifies test script is derived from library filenameTEST_FILENAME=$(basename$0)# prefix-replace needs this in a variableSUBJ_FILENAME="${TEST_FILENAME#test-}";unsetTEST_FILENAMETEST_DIR=$(dirname$0)/ANY_FAILED=0# ...
How to find newest file with given name? This post will probably be boring for you, but this is mostly just a reminder to myself, written in form of a blog post. So, I have a directory structure: /some/path/imported/DATE/TIME/file, where DATE is date of importing, in format YYYY...