On Wed, Dec 15, 2010 at 8:47 PM, Mike Martin <redt...@gmail.com> wrote: > to explain further the aim is that the one-liner is generated on the > fly and then passed to at to schedule recordings which is why I want > it to be a one liner so that at wll parse it correctly > > generating seperate files for each iteration could get really, really messy
The escaping that you'll need to pull that code off as is gets really, really messy too. ;) I was going to post it earlier, but I got confused and gave up. xD The basics are that you have basically three different "parsing levels": the initial echo command line, the embedded perl command line, and the embedded Perl code. To make it work, you'll need to make sure that the right code exists are the right levels. That means escaping special characters and escaping escaping special characters, and escaping escaping escaping special characters. :P It gets fun. On the plus side, Perl offers many quote operators, so it might not be as bad as it could have been. Still, if at all possible, you might consider a different approach. If the "generate" one-liner is mostly static with some dynamic data then just use variables and pass parameters. :-/ -- Brandon McCaig <bamcc...@gmail.com> V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Castopulence Software <http://www.castopulence.org/> <bamcc...@castopulence.org> -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/