in reply to Tag lines

... | perl -pe "BEGIN { $a = shift } s/^/$a: /" $host

Replies are listed 'Best First'.
Re^2: Tag lines
by missingthepoint (Friar) on Dec 26, 2008 at 07:00 UTC

    <nitpick>Shouldn't you use single quotes there, to prevent a possible shell variable $a from being interpolated?</nitpick>


    Life is denied by lack of attention,
    whether it be to cleaning windows
    or trying to write a masterpiece...
    -- Nadia Boulanger

      Good catch. You're absolutely right for UNIXish shells. But for cmd.exe (MS Windows), the double-quotes are necessary and safe: single quotes won't work, and things like $a are not seen as variables.

      Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.