I have been using gnu-screen's 'logfile' command to log my session histories when making production changes. I like to log each change in a different directory; this means that whenever I start a new change, I need to execute the :logfile /path/to/change/directory/%t.log
command again. I was wondering if there is a way to specify a logfile string when invoking screen?
The goal here is to be able to write a wrapper script, e.g. startchange [changenumber]
which would then change to the correct change directory and configure screen to log any sessions in that directory.
The only solution I can think of at the moment is to have a script that makes a copy of my global .screenrc, replaces the logfile string, and invokes screen with the '-c' command line option. (screen doesn't appear to support reading multiple config files either.) This feels like a fairly heavyweight solution to what should be a fairly simple problem. Does anyone have any alternative approaches?
screen
puts it's output in the current directory, so could you instead have a wrapper script something like:Not sure if this has any problems itself, but may give you another path to follow?