Re: Sed command, Insert text in front of existing line

joe_at_invalid.address
Date: 08/21/03


Date: Thu, 21 Aug 2003 17:31:04 GMT


"Søren Bryndum Christiansen" <soren.bryndum.christiansen@ericsson.com> writes:

> can anyone help me out here? Looking for some sed command for the
> following:
>
> From my script I'm getting a log file, but I would like to insert
> some extra text in front of each line eg.
>
> Output
> Output2
> Output3
>
> <text> Output
> <text> Output2
> <text> Output3
>
> How can this be done in the easiest manner?

If I understand this right, I don't think you need sed. For example

while read line; do
  print text $line
done < file

Joe



Relevant Pages

  • Re: unix shell script ignores exit when in function that is piped to tee
    ... > I thought calling a function within a script did NOT create sub-shells. ... is going to be able to alter the log file to cover up any inappropriate ... entry in the log to the previous entry. ... The easiest way to use crypt to ...
    (comp.unix.shell)
  • The necessity of Setting Objects to Nothing
    ... But what happens when you've got a script that is running as ... Dim Servers, List, strComputer ... Set Folder = objFSO.GetFolder ... '~~~ Write the results of the number of users query to a log file. ...
    (microsoft.public.scripting.vbscript)
  • Re: CSVDE Importing
    ... > specify the log file path via the -j option. ... CSVDE imports can only be used to create new users ... Unfortunately, the syntax is a bit more involved than a simple csv file, ... which makes it a little more difficult to manage its content via script. ...
    (microsoft.public.windows.server.scripting)
  • Re: CSVDE Importing
    ... > specify the log file path via the -j option. ... CSVDE imports can only be used to create new users ... Unfortunately, the syntax is a bit more involved than a simple csv file, ... which makes it a little more difficult to manage its content via script. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Recurse issue - 2nd try
    ... My script simply stops short. ... However, when I view the log file, it is missing several files. ... > is your script hanging or does it complete but somehow misses some folders? ... >> Dim sLogFile ...
    (microsoft.public.scripting.vbscript)