Giter Site home page Giter Site logo

Comments (5)

edmundlaugasson avatar edmundlaugasson commented on July 19, 2024 1

Some bash scripts to get file information about "Last-Modified"

using wget
e.g. save the following script as last-modified-wget.sh
and run sh last-modified-wget.sh

#!/bin/sh
echo "GNU/Linux 64-bit"
wget --server-response --spider http://strlen.com/treesheets/treesheets_linux64.tar.gz 2>&1 | grep Last-Modified
echo
echo "GNU/Linux 32-bit"
wget --server-response --spider http://strlen.com/treesheets/treesheets_linux.tar.gz 2>&1 | grep Last-Modified
echo
echo "MS Windows"
wget --server-response --spider http://strlen.com/treesheets/Treesheets_Setup.exe 2>&1 | grep Last-Modified
echo
echo "macOS"
wget --server-response --spider http://strlen.com/treesheets/treesheets_osx.zip 2>&1 | grep Last-Modified
echo

using curl
e.g. save the following script as last-modified-curl.sh
and run sh last-modified-curl.sh

#!/bin/sh
echo "GNU/Linux 64-bit"
curl -sI http://strlen.com/treesheets/treesheets_linux64.tar.gz | grep Last-Modified
echo
echo "GNU/Linux 32-bit"
curl -sI http://strlen.com/treesheets/treesheets_linux.tar.gz | grep Last-Modified
echo
echo "MS Windows"
curl -sI http://strlen.com/treesheets/Treesheets_Setup.exe | grep Last-Modified
echo
echo "macOS"
curl -sI http://strlen.com/treesheets/treesheets_osx.zip | grep Last-Modified
echo

Result will be like this:

GNU/Linux 64-bit
Last-Modified: Sun, 20 Nov 2016 17:52:37 GMT

GNU/Linux 32-bit
Last-Modified: Sun, 13 Sep 2015 20:05:15 GMT

MS Windows
Last-Modified: Mon, 27 Mar 2017 04:59:05 GMT

macOS
Last-Modified: Wed, 08 Mar 2017 01:30:56 GMT

About web site

  • wait while web site is fully loaded
  • enter to address bar
    javascript:alert(document.lastModified)
    ... and press enter. You will get a pop-up with last modified date and time of the web site.

from treesheets.

aardappel avatar aardappel commented on July 19, 2024

That would be good yes.. wonder if there's a way to do that automatically..

from treesheets.

ghuls avatar ghuls commented on July 19, 2024

Maybe you can use a git post-receive hook:
https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

from treesheets.

aardappel avatar aardappel commented on July 19, 2024

Thanks.. the website is entirely static though, it won't be running any bash.

from treesheets.

edmundlaugasson avatar edmundlaugasson commented on July 19, 2024

.. at least can anyone who would be interested, do it by own..
..or probably would it be possible to implement in any of the favourite web programming language

..some hints:

from treesheets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.