Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 926 Bytes

sed.md

File metadata and controls

25 lines (19 loc) · 926 Bytes

sed: non-interactive editor

sed is a stream-oriented editor. It interprets a script and performs actions on the script. sed like many Unix programs, input flows through the program and is directed to standard output. sed commands have the general form:

sed [options] `command` file(s)
sed [options] -f scriptfile files(s)

Typical uses of sed include:

  • Editing one or more files automatically
  • Simplifying repetitive edits to multiple files
  • Writing conversion programs

Examples usage:

sed --help
sed s/BSD// < ~/cli_workshop/data_files/operatingsystemlist
sed s/BSD//g < ~/cli_workshop/data_files/operatingsystemlist 
sed s/BSD//g < ~/cli_workshop/data_files/operatingsystemlist > nobsdlist
sed -n '/BSD/ p' ~/cli_workshop/data_files/operatingsystemlist

There is a rust language reimplementation of most of sed with simpler syntax called sd