Incrementing current date by 5 minutes in bash
问题 In my script I'm storing the current in date in a variable, however I would like the variable to store the date 5 minutes ahead. 29/10/2014-10:47:06 to 29/10/2014-10:52:06 Is there a quick and easy way to do this in Bash? Looking for a solution that would also work correctly if the time was 10:59:00 for example (recognising to enter the next hour). I've found some Perl solutions but nothing for Bash. 回答1: You can use the -d option: $ date mercredi 29 octobre 2014, 11:45:45 (UTC+0100) $ date