Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Thank you, I still need to use var inside var, how can I do it? dateFrom="2013-01-05" dateCalc=$(date -d '${dateFrom} - 2 days' +%F) echo $dateCalc Commented Jun 28, 2022 at 17:22
  • I need to calculate 7 days ago from a specific date and do it again on the result. Commented Jun 28, 2022 at 17:23
  • @user531769, see edit Commented Jun 28, 2022 at 18:11
  • @StéphaneChazelas, your example is not good because in my case I need the variable to be inside a command expression - backtick or $() Commented Jun 28, 2022 at 19:17
  • @user531769, and? Commented Jun 28, 2022 at 19:24