in reply to backticks execution "inside" variable (string)
Not answering your more general question (which I don't understand), but note that you can easily generate a log file name with the current date/time in it with simple Perl. For example:
This code works on any platform and has no need to interpolate bash command lines.sub get_datestamp { my ($s, $m, $h, $d, $mon, $y) = localtime; sprintf('%02d%02d%04d', $d, $mon + 1, $y + 1900); } my $logfile = 'filename_' . get_datestamp() . '.log'; print "logfile='$logfile'\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: backticks execution "inside" variable (string)
by Anonymous Monk on Dec 17, 2019 at 09:48 UTC | |
|
Re^2: backticks execution "inside" variable (string)
by richard.sharpe (Sexton) on Dec 20, 2019 at 13:36 UTC |