This commit is contained in:
lickthecheese 2020-04-03 22:28:09 -04:00
parent 7584f053da
commit 128d46b95a
1 changed files with 3 additions and 3 deletions

View File

@ -16,11 +16,11 @@ read -p "title your post: " TITLE
mkdir /tmp/smb/$USER/ -p
vim /tmp/smb/$USER/$SMBID
if [[ -f "/tmp/smb/$USER/$SMBID" ]];then
echo "====================================================" >> /tmp/smb/$USER/$SMBID.t
echo "================================================================================">> /tmp/smb/$USER/$SMBID.t
echo "Title: $TITLE" >> /tmp/smb/$USER/$SMBID.t
date "+Posted on: %d %b, %Y\\" | tr '\\\\' "\n" >> /tmp/smb/$USER/$SMBID.t
date "+Posted on: %Y-%m-%d\\" | tr '\\\\' "\n" >> /tmp/smb/$USER/$SMBID.t
cat /tmp/smb/$USER/$SMBID >> /tmp/smb/$USER/$SMBID.t
echo -e "====================================================\n\n" >> /tmp/smb/$USER/$SMBID.t
echo -e "================================================================================\n\n" >> /tmp/smb/$USER/$SMBID.t
sed -i "/--top--/r /tmp/smb/$USER/$SMBID.t" $SMBPATH
else
echo "aborting..."