I have a bash script that receives a date as a parameter ($1) in the format YYYYMMDD
What I need to do is subtract one day from the provided date. Lets take 20130701 as an example, after processing I expect to get 20130630.
How can I do this in bash? (One line solution gets bonus points!)