tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ csh, korn, bash - Which is really better and why ?

Newbie Question? Repeated Incrementing in sh ▻

Add a blank space to the beginning of each line

In article <1aTb3.154$sJ3.2759@grover.nit.gwu.edu>,
Christopher J. Mattern <syscjm@gwis2.circ.gwu.edu> wrote:
>sed 's/^/ /'

This is a correct answer to the question as posed, but I often find that
what I actually want is this.

    sed 's/^\(.\)/ \1/'

Tim.
--
Tim Goodwin   | `I can't believe that someone is releasing
University of | something called "Unix" without something
Leicester, UK | called "/bin/sh".' -- Randal L. Schwartz

Original headers:

From: tjg@ltpcg.star.le.ac.uk (Tim J Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: Add a blank space to the beginning of each line
Date: 23 Jun 1999 12:51:12 +0100
Organization: University of Leicester, UK
Message-ID: <7kqhng$sjf$1@ltpcg.star.le.ac.uk>
References: <376ff354.32125221@news.dal.ca>
  <1aTb3.154$sJ3.2759@grover.nit.gwu.edu>

△ comp.unix.shell △

◅ csh, korn, bash - Which is really better and why ?

Newbie Question? Repeated Incrementing in sh ▻