Pastebin

Paste #23725: No description

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

#!/bin/zsh                                                                       
                                                                                 
zmodload zsh/stat                                                                
                                                                                 
filename="_pages/foo.md"                                                                                               
lastmod_md="$(grep 'lastmod:' "$filename" | awk '{ print $2 }')"                 
lastmod_stat="$(date -I --date=@$(zstat +mtime $filename))"                      
                                                                                 
echo lastmod_md=$lastmod_md                                                      
echo lastmod_stat=$lastmod_stat                                                  
                                                                                 
if [[ ! "$lastmod_md" == "$lastmod_stat" ]] then                                 
    echo NOT EQUAL                                                               
fi

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.