The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 869β€…    Votes:  5β€…
Tags: canonical   community  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/1304590
Title: Does the Ubuntu Newsletter still get sent over email?
ID: /2021/01/02/Does-the-Ubuntu-Newsletter-still-get-sent-over-email_
Created: January 2, 2021    Edited:  January 24, 2021
Upload: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


You can read the newsletter by copying and pasting the address into your browser:

For previous issues just decrement the number:

Next week you would increment the number:


NOTE: This was updated January 24, 2021. If you copied the script before that please revise it.

You could make a cron job that incremented the Issue Number and emailed you a link every week. It does take a few steps to setup cron for emailing though:

I made a sample bash script for cron to send a message each week with the Ubuntu Newsletter link. Create the script with sudo powers in /etc/cron.weekly/ubuntu-newsletter

#!/bin/sh
# 
# Note: Some bash commands (#!/bin/bash) won't work in shell (#!/bin/sh)
#       Shell scripts are preferred over bash scripts for cron jobs.

# Each week /etc/cron.weekly/ubuntu-newletter will email new issue number
                
NextIssue=`cat /etc/cron.weekly/ubuntu-newsletter-issue`

[ -z ${NextIssue+x} ] && NextIssue=666    # First Time!

NextIssue=$(( NextIssue + 1 ))
echo "$NextIssue" > /etc/cron.weekly/ubuntu-newsletter-issue

echo "Weekly Ubuntu Newsletter is available for reading online:"
echo ""
echo https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/Issue"$NextIssue"

Then do a quick setup and test:

$ sudo chmod +x /etc/cron.weekly/ubuntu-newsletter

$ sudo /etc/cron.weekly/ubuntu-newsletter
cat: /etc/cron.weekly/ubuntu-newsletter-issue: No such file or directory
Weekly Ubuntu Newsletter is available for reading online:

https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/Issue666

$ ll /etc/cron.weekly/ubuntu*
-rwxr-xr-x 1 root root 444 Jan  2 13:56 /etc/cron.weekly/ubuntu-newsletter*
-rw-r--r-- 1 root root   4 Jan  2 13:57 /etc/cron.weekly/ubuntu-newsletter-issue

NOTE: After testing script for the first time use:

sudo chmod a+w /etc/cron.weekly/ubuntu-newsletter-issue

I had to use this on my system because the script doesn’t give you write permissions to manually change the last Newsletter Issue number if and when you need to.

Each week cron will email you with the shell script’s echo output:

Weekly Ubuntu Newsletter is available for reading online:

https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/Issue666

NOTE: On my system cron weekly runs every Saturday. You can manually change the last issue with:

sudo echo 666 > /etc/cron.weekly/ubuntu-newsletter-issue

In this case, the next time cron weekly runs, it will email you issue number 667.

⇧ Remember what files are opened in a session of gedit How to add a progress bar to a shell script?  β‡©