Essentially, $(date +%Y-%m-%d) and `date +%Y-%m-%d` do exactly the same thing. Personally, I find it easier to read when using $(...). It's too easy to mistake the `back-tick` for a 'single-quote (apostrophe)', depending on the font that you're using.

It mostly makes it easier to read, and therefore easier for someone who didn't write the script to understand what's going on.

Essentially, $(date +%Y-%m-%d) and `date +%Y-%m-%d` do exactly the same thing. Personally, I find it easier to read when using $(...). It's too easy to mistake the `back-tick` for a 'single-quote (apostrophe)', depending on the font that you're using.

There is one more important difference. You cannot nest back quotes, but you can nest $()'s:

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum