I have a bash script like
#!/bin/bash
DATABASE_NAME=my_database
export DATABASE_NAME
run_some_other_command
They first declare the variable and set it to a value, then in a separate line, they export it. Personally, I like to just do it in one line like:
export DATABASE_NAME=my_database
Is there some style rule against this? I've seen the declaration and export be separated by others, but never knew why.
If it helps, this script runs on Linux Mint, but could run on other Linux's or even a Mac.