I'm not saying you should all go out and set up aliases to enable your various typos and slip-ups, but I honestly don't know why I didn't do this 25 years ago.
alias cd..='cd ..'
I'm not saying you should all go out and set up aliases to enable your various typos and slip-ups, but I honestly don't know why I didn't do this 25 years ago.
alias cd..='cd ..'
Recursion usually scares me a bit, but it worked out nicely here:
#convert "cx"-style Esperanto notation to native accents (ĉ)
function eaccent {
if [[ ${1:-} ]]; then
echo "$*" |eaccent
else
sed 's/cx/ĉ/g; s/gx/ĝ/g; s/hx/ĥ/g; s/jx/ĵ/g; s/sx/ŝ/g; s/ux/ŭ/g; s/C[xX]/Ĉ/g; s/G[xX]/Ĝ/g; s/H[xX]/Ĥ/g; s/J[xX]/Ĵ/g; s/S[xX]/Ŝ/g; s/U[xX]/Ŭ/g'
fi
}
#bash #unix #shell #scripts #scripting #UnixShell #ShellScripting #Esperanto
Quick tip if you ever need to add a linebreak to the end of a file manually for whatever reason, `echo >> filename` works.
When you're dealing with plaintext data in a suspicious context, consider using `cat -v` where you'd usually use `cat`.
```
-v, --show-nonprinting
use ^ and M- notation, except for LFD and TAB
```
File this under #shell #functions I should have written years ago:
function grepc {
#Do a grep -c, but skipping files with no results
grep -c "$@" |grep -v ':0$'
}
P.S., the body of the parent #toot was created by a simple #shell #function:
function apod {
#Today's NASA Astronomy Picture of the Day info-fetcher
curl -sL 'https://apod.nasa.gov/apod/archivepix.html' \
|grep -m1 "[0-9][0-9]:" \
|sed 's/^/Date: /;
s|: *<a href="|\nURL: https://apod.nasa.gov/apod/|;
s/">/\nTitle: /; s/<.*$//'
echo
echo "#NASA #Astronomy #PictureOfTheDay"
}
#bash #ksh #mksh #shellScripting #unix #UnixShell #WebScraping #Scraping #HTML
Since people are going nuts online about how perfect February 2026 is... here you go:
~ $ cal feb 2026
February 2026
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
~ $ for x in {1900..2050}; do cal feb $x |grep -q "^ 1 " && echo $x; done
1903
1914
1920
1925
1931
1942
1948
1953
1959
1970
1976
1981
1987
1998
2004
2009
2015
2026
2032
2037
2043
Einleitung in die Linux Shell
Warum du die Shell kennen solltest Bevor Icons und Fenster die Bildschirme der Computer erobert haben, hast du Befehle eingegeben, um mit den meisten Computern zu interagieren. Auf UNIX-Systemen, von denen Linux abstammt, war das Programm, das diese Befehle interpretiert und verwaltet hat, die Shell. Du kannst dich darauf verlassen, dass die Shell unabhängig von deiner Linux-Distribution immer verfügbar ist. Sie ermöglicht dir, ausführbare Skriptdateien zu erstellen, Programme […]Rule/Yule 30 cellular automaton with a "band-pass" filter every few iterations. Done in the Bash shell using bitwise math, so each row/state is a single number of 63 bits.
#cellularautomata #cellularautomaton #rule30 #bitwiseoperators #textmode #textmodeart #oldskool #retrocomputing #unixshell #shellprogramming #xterm #joulu6 #xmastree #algorithmicart #algorist #mathart #laskutaide #ittaide #kuavataide #iterati