I write a very simple script to get the current time and display it, as below:
#!/bin/bash
CurrentTime = "date +%F-%H-%M-%S"
echo "Archive logs at ${CurrentTime}..."
I refer articles like this How to concatenate string variables in Bash
But it does not work, when executing, it will output the following:
./test.sh: line 3: CurrentTime: command not found
Archive logs at ...
Why?