Linux CLI 45 ๐งpatch and tr commands
a - patch command
patch command is used to apply a diff file to an original source
It is useful for applying bug fixes, and updating software source
syntax โ patch [options] original-file patch-file
common options: -b โ makes a backup file
-c โ interpret the patch file as a ordinary context diff -f โ force
We create one file and another one that is different
diff -u config_v1.ini config_v2.ini config_patch.diff โ creates a patch file
patch config_v1.ini config_patch.diff โ apply the patch to the file
b - tr command
tr command is used to delete or translate characters
It reads from standard input and writes to standard output
It performs characters replacements according to a mapping defined by the first argument
syntax โ tr [options] SET1
echo "hello" | tr 'e' 'E' โ changes e to E
echo "hello world" | tr 'lo' 'LO' โ changes lo to LO
echo "hello world" | tr -d 'lo' โ deletes lo
echo "HELLO WORLD" | tr 'A-Z' 'a-z' โ changes all capital letters to small
Stop using slow, ad-bloated tool sites! ๐คฎ
๐ Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
โ
Finance (Mortgage, Interest, Inflation)
โ
Tech (Base64, JSON, Dev Suite, IP)
โ
Health (BMI, BMR, TDEE)
โ
Productivity (Timer, Workspace, QR)
โก๏ธ Fast & Private
๐ No data leaves your device
๐ 100% Free
๐ Use it now: https://tools.kandz.me
๐ Bookmark itโyouโll need it later!