From Source git clone https://github.com/alexanderepstein/Bash-Snippets # clone the repository cd Bash-Snippets # cd into the cloned directory git checkout v1.23.0 # Git checkout to the latest stable release ./install.sh all # install all scripts or ./install.sh stocks # to install...
--unlink remove file before clobber --keep-badhash keep files with checksum mismatch (append .badhash) --metalink-index=NUMBER Metalink application/metalink4+xml metaurl ordinal NUMBER --metalink-over-http use Metalink metadata from HTTP response headers --preferred-location preferred location fo...
命令rmdir(remove directory)删除一个目录。这个目录必须是空的。它有两个开关: n --ignore-fail-on-non-empty——当删除的目录中有文件时,不不报告错误。 n --parents(-p)——删除所有的父目录及子目录。 $ rmdir read_only rmdir: read_only: Directory not empty $ rmdir --parents read_only/backup/...
## play video files in a current directory ## # cd ~/Download/movie-name # playavi or vlc alias playavi = 'mplayer *.avi' alias vlc = 'vlc *.avi' # play all music files from the current directory # alias playwave = 'for i in *.wav; do mplayer "$i"; done' alias playogg ...
Oftentimes, you'll see rm used with the-rflag and the-fflag. The-fflag is a sort of a nuclear option. It prevents Bash from prompting you for confirmation when you remove a file, as well as erroring out if a file or directory doesn't exist. If we do that on a, that will remov...
Includes autocompletion, themes, aliases, custom functions, a few stolen pieces from Steve Losh, and more. Bash-it provides a solid framework for using, developing and maintaining shell scripts and custom commands for your daily work. If you're using the Bourne Again Shell (Bash) regularly and...
Using the snippets from this bible can help remove unneeded dependencies from scripts and in most cases make them faster. I came across these tips and discovered a few while developing neofetch, pxltrm and other smaller projects.The snippets below are linted using shellcheck and tests have been ...
"User configurable variables are in" "setupTermuxArchConfigs.bash" ". To create this file from" "kownconfigurations.bash" "in the working directory, run" "bash ${0##*/} manual" "to create and edit" "setupTermuxArchConfigs.bash" "." printf "\\n\\e[1;33m %s\\e[1;34m %s \\e[...
") # Push Fruits+=('Watermelon') # Also Push Fruits=( ${Fruits[@]/Ap*/} ) # Remove by regex match unset Fruits[2] # Remove one item Fruits=("${Fruits[@]}") # Duplicate Fruits=("${Fruits[@]}" "${Veggies[@]}") # Concatenate lines=(`cat "logfile"`) # Read from file...
(its usual regular expression meaning), but in the pattern ‘"xxx.txt"’ it can only match a literal ‘.’. Shell programmers should take special care with backslashes, since backslashes are used both by the shell and regular expressions to remove the special meaning from the following ...