Closed buzzing-bee closed 5 years ago
That's weird. Are you sure you copied the script correctly?
Can you show the full output of the script running it with bash -xv
? Example:
bash -xv ./walarchivecleanup.sh -p /var/lib/postgresql/9.6/main/archive -a 10
Adapt to your own environment, the way you wanted to run the script.
sorry, my bad. Your script is running just fine. just need to make the script in unix format.
I found solution to my problem earlier from here: https://stackoverflow.com/questions/27176781/bash-file-returns-unexpected-token-do-r/43004720
Thank's for your script, it's a live safer
i run, walarchivecleanup.sh: 34: walarchivecleanup.sh: Syntax error: word unexpected (expecting "do")
I got error when I run the script on Ubuntu 18.04
walarchivecleanup.sh: line 28: $'\r': command not found walarchivecleanup.sh: line 32: syntax error near unexpected token
$'do\r'' 'alarchivecleanup.sh: line 32:
do