diff --git a/cluster-to-other.sh b/cluster-to-other.sh index 63bb281..5f4bf6c 100755 --- a/cluster-to-other.sh +++ b/cluster-to-other.sh @@ -20,6 +20,7 @@ # along with this program. If not, see . month=$(date '+%m') +let prevmonth=$month-1 year=$(date '+%Y') # Change this to the first letter of your login name letter="s" @@ -48,6 +49,13 @@ finger() # Remove the control characters from the $month-e01 file and write it as $month-e02 cat /sdf/arpa/ns/$letter/$USER/finger/$month-e01 | col -b -x > /sdf/arpa/ns/$letter/$USER/finger/$month-e02 + # Remove the HTML link reference to previous month posts + if [ $prevmonth -lt 10 ]; then + sed -i "s/0$prevmonth//" /sdf/arpa/ns/$letter/$USER/finger/$month-e02 + else + sed -i "s/$prevmonth//" /sdf/arpa/ns/$letter/$USER/finger/$month-e02 + fi + # Write a header file from index-e02 head -n 5 /sdf/arpa/ns/$letter/$USER/finger/index-e02 > /sdf/arpa/ns/$letter/$USER/finger/header @@ -99,7 +107,7 @@ gopher() # From the index-e02 file write the index cp /sdf/arpa/ns/$letter/$USER/gopher-prep/index-e02 /ftp/pub/users/$USER/index - # From the $month-e02 file write the month + # From the $month-e02 file write the $month cp /sdf/arpa/ns/$letter/$USER/gopher-prep/$month-e02 /ftp/pub/users/$USER/posts/$year/$month chmod -R 754 /ftp/pub/users/$USER