Welcome to the Linux Foundation Forum!

Practice Question Review

  1. Move line 123 to line 5
    a) Using ed (the line-editor that sed and grep are derived from)

printf '123m4\nw\n' | ed input

To move line 123 to be the line after line 4, just do 123m4

In this example the w command writes the data, and the \n is a boundary for the w command.

Comments

Categories

Upcoming Training