Project

General

Profile

Feature #643

Using Sed To Add Spaces To The Beginning Of Each Line Of A File

Added by Daniel Curtis about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Shell Scripts
Target version:
Start date:
08/25/2015
Due date:
% Done:

100%

Estimated time:
0.10 h
Spent time:

Description

This is a super simple way of adding a number of spaces to the beginning of each line of a given file.

  • Add 3 spaces to the beginning of every line of a file:
    sed -i -e 's/^/   /' example-file.txt
    

Resources

History

#1 Updated by Daniel Curtis about 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#2 Updated by Daniel Curtis about 2 years ago

  • Subject changed from Using Sed To Add Spaces To Each Line Of A File to Using Sed To Add Spaces To The Beginning Of Each Line Of A File

#3 Updated by Daniel Curtis about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF