Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
@rl_dane@polymaths.social  ·  activity timestamp 3 days ago

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$'
}

#unix #UnixShell #ShellScripting #bash #ksh

  • Copy link
  • Flag this post
  • Block
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
@rl_dane@polymaths.social  ·  activity timestamp 5 days ago

Today's #APOD's a looker ;)

Date: 2026 February 02
URL: https://apod.nasa.gov/apod/ap260202.html
Title: Orion: The Running Man Nebula

#NASA #Astronomy #PictureOfTheDay

APOD: 2026 February 2 – Orion: The Running Man Nebula

A different astronomy and space science related image is featured each day, along with a brief explanation.
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
@rl_dane@polymaths.social replied  ·  activity timestamp 5 days ago

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

  • Copy link
  • Flag this comment
  • Block
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
@rl_dane@polymaths.social  ·  activity timestamp 5 days ago

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

#bash #BashOneLiner #ShellOneLiner #shell #UnixShell #unix

  • Copy link
  • Flag this post
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About · Code of conduct · Privacy ·
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct