Transcription regulation and environmental adaptation in bacteria