8465 shaares
203 private links
203 private links
104 results
tagged
bash
A great list of tools. A majority of them are written in Rust 😄
😮
cat toto.txt | sort | uniq > pas-de-doublons.txt
to
cat toto.txt | awk '!x[$0]++' > pas-de-doublons.txt
Using the shell for daily tiny tasks ❤️
Fun ! This respect the KISS principle 😄
Using the tool named souffle
.
command | meaning |
---|---|
${parameter:-defaultValue} | Get default shell variables value |
${parameter:=defaultValue} | Set default shell variables value |
${parameter:?"Error Message"} | Display an error message if parameter is not set |
${#var} | Find the length of the string |
${var%pattern} | Remove from shortest rear (end) pattern |
${var%%pattern} | Remove from longest rear (end) pattern |
${var:num1:num2} | Substring |
${var#pattern} | Remove from shortest front pattern |
${var##pattern} | Remove from longest front pattern |
${var/pattern/string} | Find and replace (only replace first occurrence) |
${var//pattern/string} | Find and replace all occurrences |
${!prefix*} | Expands to the names of variables whose names begin with prefix. |
${var,} | Convert first character to lowercase. |
${var,pattern} | Convert only if the pattern match |
${var,,} | Convert all characters to lowercase. |
${var,,pattern} | Convert only if the pattern match |
${var^} | Convert first character to uppercase. |
${var^pattern} | Convert only if pattern match |
${var^^} | Convert all character to uppercase.} |
${var^^pattern} | Convert only if pattern match |
Using two clipboards: one main + one swap
Make import of bash functions from an URL, mhmhmhmh
❤️
This is marvelous. The shell is now so beautiful 🥺 💙
Paste, fold, ... ♥
Wow look at this UI 🥰
On reprends les tips 👍
Juste après le « shebang », mettre ça sur la ligne d’après :
set -euo pipefail
set -e
which ensures that your script stops on first command failure.set -u
which ensures that your script exits on the first unset variable encountered.set -o pipefail
which ensures that if any command in a set of piped commands failed, the overall exit status is the status of the failed command.
😍 Wow, c'est outil à la classe pour sa simplicité et tout ce qu'on peut faire avec !
Un superbe moyen de transférer des fichiers en P2P, ou alors envoyer des données via les pipes❗
Not only adding some blank line but clean the terminal for real : printf "\033c"
or tput reset
: