Skip to content

mahriman/dirnews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

dirnews / news.sh

news.sh is a bash script replacement for sysnews, written for FreeBSD but easily changed to fit your NX flavor.

Description:

news.sh shows the contents of files specified in $DIRNEWSDIR along with file owner and modified date of file.

File ending .txt is stripped and underscore is replaced with whitespace to create the title of the news item.

When a news item has been read the script creates $DIRNEWSHOMEDIR<newsitem_name>.read

$DIRNEWSDIR should have mode 1777 set to allow any user to create news, but prohibit deletion of other users' news.

$DIRNEWSDIR and $DIRNEWSHOMEDIR should end with trailing /

Some commands (e.g. stat(1)) have different syntax in FreeBSD than GNU versions.

Help:

news.sh 1.2 [invoked as /bin/news]

Usage: /bin/news [options]

OPTIONS:

-all: Read all news even if already read

-clean: Remove (all) files in $DIRNEWSHOMEDIR that mark news as read

-user : Read all news written by <username>

-help: This help

About

FreeBSD bash script replacement for sysnews

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages